Skip to content

Help wanted: additional OAuth library patterns #1

@Neelagiri65

Description

@Neelagiri65

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:

  1. A new rule in src/authdrift/rules/ following the existing YAML format
  2. A vulnerable fixture in tests/fixtures/ that triggers the rule
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions