authdrift v0.1.0 ships with three Semgrep rules covering passport.js, NextAuth + Prisma, and Python (Django/SQLAlchemy). These catch the most common patterns, but there are many more OAuth libraries where email is used as the identity key.
Patterns we'd like to add:
lucia-auth (Lucia v3) — session/user creation by email
authlib (Python) — Google OAuth handlers keying on email
omniauth-google-oauth2 (Ruby/Rails) — find_by(email:) in callback
- Clerk — custom sign-in flows resolving by email
- Supabase Auth — email-keyed
auth.users lookups in RLS policies or Edge Functions
- Firebase Auth —
getUserByEmail() as the primary identity lookup
- Spring Security OAuth2 (Java) —
UserDetailsService keyed on email
- ASP.NET Identity (C#) —
FindByEmailAsync in external login callbacks
If you've seen this pattern in another library or framework, open a PR with:
- A new rule in
src/authdrift/rules/ following the existing YAML format
- A vulnerable fixture in
tests/fixtures/ that triggers the rule
- A safe fixture that does NOT trigger (uses
sub/provider ID instead)
The CI will validate that your rule fires on the vulnerable fixture and stays silent on the safe one.
authdrift v0.1.0 ships with three Semgrep rules covering passport.js, NextAuth + Prisma, and Python (Django/SQLAlchemy). These catch the most common patterns, but there are many more OAuth libraries where email is used as the identity key.
Patterns we'd like to add:
lucia-auth(Lucia v3) — session/user creation by emailauthlib(Python) — Google OAuth handlers keying on emailomniauth-google-oauth2(Ruby/Rails) —find_by(email:)in callbackauth.userslookups in RLS policies or Edge FunctionsgetUserByEmail()as the primary identity lookupUserDetailsServicekeyed on emailFindByEmailAsyncin external login callbacksIf you've seen this pattern in another library or framework, open a PR with:
src/authdrift/rules/following the existing YAML formattests/fixtures/that triggers the rulesub/provider ID instead)The CI will validate that your rule fires on the vulnerable fixture and stays silent on the safe one.