diff --git a/docs/deployment-strategy.md b/docs/deployment-strategy.md index b8172ef..40e4d1e 100644 --- a/docs/deployment-strategy.md +++ b/docs/deployment-strategy.md @@ -76,3 +76,70 @@ Production container deployments must adhere to the following security baselines - **Scope:** The final runtime image (not intermediate build stages), scanned directly from the local Docker daemon. - **Trade-off:** Setting the threshold to `critical` blocks deployment for any unpatched critical CVE in the final image. This is the strictest policy and may require occasional triage of false positives or accept-risk overrides. A more permissive "advisory-only" approach would log findings without blocking the pipeline; the current configuration chooses security gate over velocity. Teams may relax to `high` after evaluating their vulnerability management process. - **Artifacts:** Scan reports in SARIF format are uploaded as workflow artifacts for every run (including PRs). + +## Content Security Policy (CSP) Configuration + +The frontend production image (`frontend/nginx.conf`) ships a strict Content-Security-Policy: + +``` +default-src 'self'; +script-src 'self'; +style-src 'self' https://fonts.googleapis.com; +font-src 'self' https://fonts.gstatic.com; +img-src 'self' data:; +connect-src 'self' ${API_ORIGIN} https://soroban-testnet.stellar.org https://horizon-testnet.stellar.org; +frame-ancestors 'none'; +base-uri 'self'; +form-action 'self'; +report-uri /csp-report; +report-to csp-endpoint; +``` + +### Why no `'unsafe-inline'` in `style-src` + +The codebase renders all styles through Tailwind CSS class utilities plus a small +set of stylesheet classes (`global.css`). There are no inline `style="..."` attributes +or `