Skip to content

fix(tech-detect): a Stripe publishableKey is not a Clerk key #1478 - #1479

Closed
nc9 wants to merge 1 commit into
mainfrom
fix/clerk-key-1478
Closed

nc9 wants to merge 1 commit into
mainfrom
fix/clerk-key-1478

Conversation

@nc9

@nc9 nc9 commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Closes #1478 (first two criteria; the corpus re-detect is a run on the box).

The Clerk bundle pattern took any publishableKey: "pk_live_..." or pk_test_ with a 20 to 200 character body. Stripe publishable keys share the prefix and the property name, so stripe:{publishableKey:"pk_live_..."} in an app config read as Clerk.

A Clerk key's body is the base64 of its Frontend API host (clerk.<domain>$, <name>.clerk.accounts.dev$), so it contains the base64 of clerk at one of its three alignments: Y2xlcm, ZXJr or bGVy. The two inBundle patterns (pk_test_, pk_live_) now need one of those inside the key (a bounded split of the body around it, no lookahead). Stripe's opaque body has none (a chance hit of a 4-character run in a 99-character body is about 1 in 160,000).

  • Tests (bundle-content-1254.test.ts, 57 pass; the Stripe test fails on main): a Stripe live and a test key, quoted and with the || fallback shape, detect no Clerk; real-shaped keys (base64 of clerk.example.com$, foo-bar-12.clerk.accounts.dev$ and four more hosts) still detect, with test and live prefixes; a bundle holding both detects Clerk once. Two existing fixtures used "a".repeat(30) bodies and now use the base64 of clerk.example.com$. Key-shaped test strings are built at run time or marked for the secret scanner.
  • The other tech-detect and audit-engine suites that mention Clerk pass (extras budget, real build, local caps, pattern bounds, fingerprints, vibe coding).
  • Docs sentence in docs/cloud/technologies.mdx, CHANGELOG under Unreleased / Fixed.
  • The third criterion (corpus re-detect: Clerk matches v0.0.151's plus only verified installs) is a run over the stored crawls and is not done here.

Skill: no change needed.

nik

…y must hold the base64 of clerk #1478

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9

nc9 commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Closing this draft: #1481 covers the Clerk publishable-key validation for #1478, so this duplicate approach (the base64-of-clerk check in the bundle patterns) is parked on its branch and not pursued.

nik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tech detection: Clerk publishable-key pattern matches a Stripe publishableKey (pk_live_)

1 participant