Files
nick-doc/Issues/ISSUE-083-frontend-no-content-security-policy-header-in-next-config.md
Siavash Sameni dceaf82934 audit: 2026-05-30 full-codebase audit — report, issues, docs, runbooks
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>
2026-05-30 18:48:04 +04:00

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
security
frontend
csp
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

  1. Ship Content-Security-Policy-Report-Only first to collect violations, then enforce — safe rollout.
  2. Enforce a moderate CSP allowing required hosts (Telegram, WalletConnect, Mapbox, Sentry) with nonces for inline scripts.
  3. Strict CSP with nonces and removal of all inline scripts — strongest but requires refactoring layout.tsx inline 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:29
  • frontend/src/app/layout.tsx — inline scripts that need nonces

References