Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flask-cors-misconfiguration rule #3506

Merged
merged 4 commits into from
Nov 18, 2024
Merged

Add flask-cors-misconfiguration rule #3506

merged 4 commits into from
Nov 18, 2024

Conversation

lfama
Copy link
Contributor

@lfama lfama commented Nov 4, 2024

Hi!

I've created a simple rule that matches flask_cors misconfiguration.

Basically when setting origin="*" and support_credentials=True flask_cors dinamically reflects the Origin of each request in the Access-Control-Allow-Origin header which together with Access-Control-Allow-Credential set to true can be dangerous.

@0xDC0DE
Copy link
Contributor

0xDC0DE commented Nov 12, 2024

Hi! @lfama Thanks for your contribution, this rule looks good! I've made a suggestion to improve your rule slightly. If you address this and the CI checks pass, we can merge this. 🥇

@0xDC0DE 0xDC0DE enabled auto-merge (squash) November 18, 2024 07:11
@0xDC0DE 0xDC0DE merged commit 3b05904 into semgrep:develop Nov 18, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants