fix(dsn): Ignore docs placeholder DSNs - #1416
Merged
Merged
Conversation
Co-Authored-By: Sergiy Dybskiy <sergiy.dybskiy@sentry.io>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
betegon
marked this pull request as ready for review
August 13, 2026 09:43
Reject all-zero org/project IDs and known docs public keys so copied sentry-docs examples do not become API org context. Co-Authored-By: Miguel Betegon <miguel.betegon@sentry.io>
betegon
enabled auto-merge (squash)
August 13, 2026 09:52
Do not treat bare "public" / "publickey" as docs placeholders. Legacy DSNs and scanner fixtures still use those as real keys; docs copies with bare public also use o0 and are caught by all-zero org/project id checks.
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.
Docs and SDKs use placeholder DSNs such as
https://examplePublicKey@o0.ingest.sentry.io/0. The CLI previously treated those values as real project context. Auto-detect then called APIs with org0and returned 404s (for examplesentry conversation listinsentry-docs).parseDsnnow rejects common documentation placeholders:o0/o00000examplePublicKey, barepublic,YOUR_DSN_HERE,___PUBLIC_DSN___,__DSN__, angle-bracket templates)Regression coverage includes the sentry-docs codeContext default and nearby docs variants.
Checks:
pnpm exec vitest run test/lib/dsn.test.ts test/lib/dsn.property.test.ts(57 passed)pnpm exec biome checkon touched filesFull
pnpm run typecheckis still blocked by the existing Node loader error inscript/require-shim.mjsduring generated-doc setup.Requested by bete.
--
View Junior Session [Sentry]