Skip to content

Add comprehensive security-headers e2e test suite - #399

Merged
kilodesodiq-arch merged 1 commit into
ChainForgee:mainfrom
P3az3:fix/issue-215-hsts-security-headers
Jul 22, 2026
Merged

Add comprehensive security-headers e2e test suite#399
kilodesodiq-arch merged 1 commit into
ChainForgee:mainfrom
P3az3:fix/issue-215-hsts-security-headers

Conversation

@P3az3

@P3az3 P3az3 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Added a dedicated security-headers.e2e-spec.ts that comprehensively asserts all required security headers are present with correct values in both production and development modes.

Changes

  • Created test/security-headers.e2e-spec.ts with 8 test cases covering:
    • Production mode: all 9 required security headers (HSTS, CSP, X-Frame-Options, etc.)
    • CSP includes report-uri /api/v1/csp-report for violation reporting
    • HSTS includes preload and includeSubDomains directives
    • Production-only headers absent in development mode
    • Dev-appropriate headers present in development mode
    • x-powered-by header never leaked
  • Test follows existing security.e2e-spec.ts patterns (NestJS testing module, supertest)

Closes #215

@kilodesodiq-arch kilodesodiq-arch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kilodesodiq-arch
kilodesodiq-arch merged commit 3a3a937 into ChainForgee:main Jul 22, 2026
5 checks passed
ifygreg01-best pushed a commit to ifygreg01-best/ChainForge that referenced this pull request Jul 23, 2026
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.

Production HSTS hardening: preload, no-store on error pages, and CSP report-only diagnostic

2 participants