Repository navigation
fix(detectors/auth0oauth): match Auth0 Private Cloud auth0app.com domains - #5354
Merged
kvnphvm merged 1 commit intoOct 1, 2026
Merged
Conversation
saghaulor
force-pushed
the
fix-auth0oauth-private-cloud-domain
branch
3 times, most recently
from
September 29, 2026 13:02
e24da35 to
b9d62cb
Compare
…ains domainPat required the literal substring auth0.com, so it never matched Auth0 Private Cloud tenants' default managed domain (*.auth0app.com). Since FromData only emits a result when a client_id, client_secret, and a domain match are all present together, a leaked credential pair next to its real Private Cloud domain was silently dropped -- no result, no verification attempt. *.auth0app.com is Auth0's own documented default for Private Cloud tenants, not a one-off customer naming choice: https://auth0.com/docs/migrate-private-cloud-custom-domains Add an optional, non-capturing app group so domainPat matches both *.auth0.com and *.auth0app.com. Fully custom domains (e.g. login.example.com) have no learnable Auth0-related substring and remain out of scope. A pre-existing, unrelated regex quirk was discovered while adding regression tests: a bare domain with no leading character (e.g. "auth0.com" or "auth0app.com" with no subdomain/prefix at all) never matches, since the leading character class must be consumed before the literal "auth0" substring. Left as a TODO on domainPat rather than fixed here, since it's out of scope for this change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
saghaulor
force-pushed
the
fix-auth0oauth-private-cloud-domain
branch
from
September 30, 2026 20:07
b9d62cb to
8367a30
Compare
shahzadhaider1
approved these changes
Oct 1, 2026
kvnphvm
approved these changes
Oct 1, 2026
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.
Summary
domainPatin the auth0oauth detector required the literal substringauth0.com, so it never matched Auth0 Private Cloud tenants' default managed domain (*.auth0app.com)FromDataonly emits a result when a client_id, client_secret, and a domain match are all present together, a leaked credential pair next to its real Private Cloud domain was silently dropped — no result, no verification attempt*.auth0app.comis Auth0's own documented default for Private Cloud tenants: https://auth0.com/docs/migrate-private-cloud-custom-domainsappgroup sodomainPatmatches both*.auth0.comand*.auth0app.comlogin.example.com) have no learnable Auth0-related substring and remain out of scopeTODOondomainPatnoting a pre-existing, unrelated regex quirk found while adding tests (bare domains with no leading character never match) — not fixed here since it's out of scope for this changeTest plan
go test ./pkg/detectors/auth0oauth/...— all cases pass, including new regression cases for the Private Cloud domain match, a no-separator boundary case, and a negative case ensuring the optional group doesn't degrade into matching arbitrary.comdomainsgo build ./...,go vet,gofmt -l— clean🤖 Generated with Claude Code
Note
Low Risk
Scoped regex and test updates in the Auth0 OAuth detector only; no auth, verification, or API behavior changes beyond broader domain matching.
Overview
The Auth0 OAuth detector’s domain regex now accepts Private Cloud managed hosts ending in
auth0app.com, not onlyauth0.com. Because findings require a matched domain alongside client ID and secret, leaks tied to*.auth0app.comwere previously ignored entirely.The pattern adds an optional
appsegment before.comso behavior for standardauth0.comtenants is unchanged. Comments document Private Cloud defaults and a pre-existing regex limitation (bareauth0.com/auth0app.comwith no prefix still won’t match); that quirk is not fixed here.Tests cover a typical Private Cloud domain, the existing word-boundary behavior for suffixes glued to a prefix (e.g.
xauth0app.com), and a negative case so generic*.example.comdomains are not matched.Reviewed by Cursor Bugbot for commit 8367a30. Bugbot is set up for automated code reviews on this repo. Configure here.