Full-codebase-audit 2026-05-30 outputs: - Audit report: 09 - Audits/Full Codebase Audit - 2026-05-30.md - 81 issue files ISSUE-055..135 (decisions + 1 skipped no-brainer). - Scanner docs from scratch (was zero): architecture, data model, API ref, payment flow, operations runbook + repo README. - Doc-sync updates across API reference, data models, flows, design system. - Secret Rotation Runbook (08 - Operations) for the exposed credentials. - Reusable workflow guide (07 - Development) + .claude/workflows/full-codebase-audit.js. Issues remain status:open intentionally — the code fixes are uncommitted-then-committed working-tree changes per repo and aren't "resolved" until merged/deployed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1.4 KiB
1.4 KiB
issue, title, severity, domain, labels, status, created, source
| issue | title | severity | domain | labels | status | created | source | |||
|---|---|---|---|---|---|---|---|---|---|---|
| 083 | Frontend: no Content-Security-Policy header in Next.js config | medium | Security |
|
open | 2026-05-30 | Full Codebase Audit 2026-05-30 |
Frontend: no Content-Security-Policy header in Next.js config
Severity: medium Domain: Security Labels: security, frontend, csp
Description
next.config.ts:29 does not set a Content-Security-Policy header. Without CSP, XSS attacks have unrestricted script execution, making token theft (localStorage) and DOM-based attacks much easier.
Options
- Ship
Content-Security-Policy-Report-Onlyfirst to collect violations, then enforce — safe rollout. - Enforce a moderate CSP allowing required hosts (Telegram, WalletConnect, Mapbox, Sentry) with nonces for inline scripts.
- Strict CSP with nonces and removal of all inline scripts — strongest but requires refactoring
layout.tsxinline scripts.
Recommendation
Ship Content-Security-Policy-Report-Only first, gather violations for a week, then enforce. Inline scripts in layout.tsx must move to nonces. Non-trivial rollout.
Affected Files
frontend/next.config.ts:29frontend/src/app/layout.tsx— inline scripts that need nonces
References
- Full Codebase Audit 2026-05-30 — DEC-8