Add Semgrep rules for authlib, Firebase Auth, and Lucia Auth (#1)#2
Closed
xyaz1313 wants to merge 1 commit intoNeelagiri65:mainfrom
Closed
Add Semgrep rules for authlib, Firebase Auth, and Lucia Auth (#1)#2xyaz1313 wants to merge 1 commit intoNeelagiri65:mainfrom
xyaz1313 wants to merge 1 commit intoNeelagiri65:mainfrom
Conversation
…ri65#1) New rules: - authlib-google-oauth-email-as-primary-key: catches Django/Flask + authlib using userinfo['email'] as lookup key - firebase-auth-getUserByEmail: catches admin.auth().getUserByEmail() usage - lucia-auth-email-as-primary-key: catches Lucia v3 email-based user lookup New fixtures: - authlib-vulnerable.py / authlib-safe.py - firebase-vulnerable.js
Owner
|
Thanks for this — your rules were already merged into main via 7ba9bc0 with attribution. I evaluated the three patterns (authlib, Firebase Auth, Lucia v3), deduplicated the authlib patterns against the existing Python rule, added the missing safe fixtures (authlib-safe, firebase-safe, lucia-safe), and upgraded CI to dynamic per-fixture validation so future contributions validate automatically. The CI failure here is expected — this branch predates the CI changes on main, so the finding count no longer matches. No action needed on your end. Appreciate the contribution. If you spot other ecosystems worth covering (OmniAuth/Ruby is the obvious gap), feel free to open a new PR against current main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1
Added 3 new Semgrep rules and test fixtures for OAuth email-as-primary-key detection:
New rules (in oauth-email-key-extended.yaml):
authlib-google-oauth-email-as-primary-key — Catches Python (Django/Flask) + authlib using as user lookup key. Covers , , , and patterns.
firebase-auth-getUserByEmail — Catches calls in Node.js. This is Firebase Auth's primary way to resolve users by email.
lucia-auth-email-as-primary-key — Catches Lucia v3 email-based user lookups via and .
New test fixtures:
Happy to add more patterns or adjust the Semgrep syntax if needed.