Skip to content

fix(dsn): Ignore docs placeholder DSNs - #1416

Merged
betegon merged 3 commits into
mainfrom
fix/ignore-placeholder-dsns
Aug 13, 2026
Merged

fix(dsn): Ignore docs placeholder DSNs#1416
betegon merged 3 commits into
mainfrom
fix/ignore-placeholder-dsns

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

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 org 0 and returned 404s (for example sentry conversation list in sentry-docs).

parseDsn now rejects common documentation placeholders:

  • all-zero SaaS org IDs from hosts like o0 / o00000
  • all-zero project IDs
  • known placeholder public keys (examplePublicKey, bare public, 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 check on touched files

Full pnpm run typecheck is still blocked by the existing Node loader error in script/require-shim.mjs during generated-doc setup.

Requested by bete.

--

View Junior Session [Sentry]

Co-Authored-By: Sergiy Dybskiy <sergiy.dybskiy@sentry.io>
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cli Ready Ready Preview Aug 13, 2026 9:56am

Request Review

@betegon
betegon marked this pull request as ready for review August 13, 2026 09:43
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Aug 13, 2026
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>
@sentry-junior sentry-junior Bot changed the title fix(dsn): Ignore placeholder identifiers fix(dsn): Ignore docs placeholder DSNs Aug 13, 2026
@betegon
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.
@betegon
betegon merged commit 600af67 into main Aug 13, 2026
32 checks passed
@betegon
betegon deleted the fix/ignore-placeholder-dsns branch August 13, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant