Skip to content

security: harden CORS and CSRF cookie defaults#2027

Merged
bpamiri merged 3 commits into
developfrom
peter/security-cors-cookie-defaults
Apr 8, 2026
Merged

security: harden CORS and CSRF cookie defaults#2027
bpamiri merged 3 commits into
developfrom
peter/security-cors-cookie-defaults

Conversation

@bpamiri
Copy link
Copy Markdown
Collaborator

@bpamiri bpamiri commented Apr 8, 2026

Summary

  • Change CORS allowOrigins default from "*" (allow all) to "" (deny-by-default) — developers must explicitly configure allowed origins
  • Set csrfCookieHttpOnly and csrfCookieSecure defaults to true instead of empty string

Test plan

  • New CorsSpec.cfc verifies deny-by-default behavior and explicit origin allowlisting
  • New SecurityDefaultsSpec.cfc verifies cookie flag defaults
  • CI passes on Lucee + Adobe engines

🤖 Generated with Claude Code

…bility

SQLite works on all engines (Lucee + Adobe), H2 is Lucee-only. Also fixes
file modes and trailing newline in test plugin assets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bpamiri and others added 2 commits April 7, 2026 20:17
- Change CORS allowOrigins default from "*" to "" (deny-by-default)
- Set csrfCookieHttpOnly and csrfCookieSecure defaults to true

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant