Skip to content

fix: Remove wildcard CSRF origin and add production security settings#145

Merged
spalmurray merged 2 commits intomainfrom
spalmurray/django-security-settings
Apr 9, 2026
Merged

fix: Remove wildcard CSRF origin and add production security settings#145
spalmurray merged 2 commits intomainfrom
spalmurray/django-security-settings

Conversation

@spalmurray
Copy link
Copy Markdown
Contributor

@spalmurray spalmurray commented Apr 7, 2026

Replaces the wildcard CSRF trusted origin with specific prod and test subdomains. Adds production-only security settings: SSL redirect, content type nosniff, proxy SSL header, and secure cookies. All gated on non-dev environments.

@spalmurray spalmurray force-pushed the spalmurray/django-security-settings branch from 8d2cbdc to 09d031b Compare April 7, 2026 20:04
@spalmurray spalmurray marked this pull request as ready for review April 7, 2026 20:04
@spalmurray spalmurray requested a review from a team as a code owner April 7, 2026 20:04
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d7125cb. Configure here.

Copy link
Copy Markdown

@geoffg-sentry geoffg-sentry left a comment

Choose a reason for hiding this comment

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

CodeQL false positives, you were right @spalmurray. The LB is TLS terminating at the edge, IAP is enforcing HTTPS, and SSL stripping is just unrealistic here

@taylor-osler-sentry taylor-osler-sentry self-requested a review April 9, 2026 17:42
@spalmurray spalmurray merged commit 9755df5 into main Apr 9, 2026
30 checks passed
@spalmurray spalmurray deleted the spalmurray/django-security-settings branch April 9, 2026 17:42
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.

4 participants