Skip to content

security: harden infrastructure (nginx, Docker, compose)#23

Merged
marinone94 merged 2 commits into
mainfrom
fix/infra-security
Mar 11, 2026
Merged

security: harden infrastructure (nginx, Docker, compose)#23
marinone94 merged 2 commits into
mainfrom
fix/infra-security

Conversation

@marinone94

Copy link
Copy Markdown
Owner

Summary

  • nginx: Content-Security-Policy, Strict-Transport-Security (2yr, preload), Permissions-Policy (deny camera/mic/geo/payment)
  • Dockerfile: non-root appuser via groupadd/useradd, --chown on COPY, USER appuser
  • docker-compose: Qdrant ports bound to 127.0.0.1 (not exposed to network), PostgreSQL credentials via ${POSTGRES_PASSWORD:-cherry} env vars

Test plan

  • docker compose up starts services normally
  • curl localhost:6333 from host works; remote access blocked
  • nginx response headers include CSP, HSTS, Permissions-Policy
  • Container process runs as non-root (docker exec <id> whoamiappuser)

🤖 Generated with Claude Code

@marinone94 marinone94 mentioned this pull request Mar 10, 2026
1 task
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Mar 10, 2026

Copy link
Copy Markdown

Deploying cherry-evals with  Cloudflare Pages  Cloudflare Pages

Latest commit: 528b16d
Status: ✅  Deploy successful!
Preview URL: https://dac836bc.cherry-evals.pages.dev
Branch Preview URL: https://fix-infra-security.cherry-evals.pages.dev

View logs

marinone94 added a commit that referenced this pull request Mar 11, 2026
…#23, #25

Mark 17 findings as fixed/mitigated, update executive summary,
reorganize remediation roadmap into done/immediate/before-launch/after-launch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
marinone94 and others added 2 commits March 11, 2026 06:50
- nginx: add CSP, HSTS (2yr preload), Permissions-Policy headers
- Dockerfile: run as non-root user (appuser) in production
- docker-compose: bind Qdrant ports to 127.0.0.1, use env vars for
  DB credentials with safe defaults

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove HSTS preload flag (too aggressive for first deployment)
- Bind Postgres port to 127.0.0.1 (consistent with Qdrant)
- Align X-Frame-Options with CSP frame-ancestors (both DENY/none)
- Add missing CSP directives: font-src, object-src, base-uri

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
marinone94 added a commit that referenced this pull request Mar 11, 2026
…#23, #25

Mark 17 findings as fixed/mitigated, update executive summary,
reorganize remediation roadmap into done/immediate/before-launch/after-launch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@marinone94
marinone94 merged commit d3dacf1 into main Mar 11, 2026
4 checks passed
@marinone94
marinone94 deleted the fix/infra-security branch March 11, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant