Repository navigation
Conversation
nc9
force-pushed
the
fix/1293-1294-secrets-public-clients
branch
3 times, most recently
from
November 1, 2026 12:29
a9d115f to
a6cde89
Compare
4 tasks
nc9
force-pushed
the
fix/1293-1294-secrets-public-clients
branch
2 times, most recently
from
November 1, 2026 15:00
66d7dd6 to
8da3e7c
Compare
nc9
force-pushed
the
fix/1293-1294-secrets-public-clients
branch
3 times, most recently
from
November 1, 2026 18:47
a4a8de8 to
ec5d810
Compare
…rs, docs passwords, base64 A runs, asset names; labels Paystack keys #1283 #1227 Signed-off-by: Nik Cubrilovic <[email protected]>
…con JWTs, presigned ids; search keys and consent issuers stay reported #1287 #1229 Signed-off-by: Nik Cubrilovic <[email protected]>
…orks, Shopify Admin, Stripe restricted and Google OAuth secrets; sbp_ is a personal access token; Hygraph JWTs #1309 Signed-off-by: Nik Cubrilovic <[email protected]>
…sample data tables and puzzle objects are not leaks #1292 #1308 Signed-off-by: Nik Cubrilovic <[email protected]>
… keys; public-looking names and lone AWS ids stay reported with evidence #1293 #1294 Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
fix/1293-1294-secrets-public-clients
branch
from
November 1, 2026 19:54
ec5d810 to
7c9ac53
Compare
Merged
Contributor
Author
|
Landed in v0.0.158 as nik |
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.
Fixes #1293
Fixes #1294
Depends on #1298, #1300, #1309 and #1292/#1308 (a chain on one file; merge in that order and this PR shows only its own diff).
Classifies signed-URL tokens and browser SDK keys. Per review (public and info findings are absent from the JSON output, so a downgrade is a silent drop for machines): only positive evidence downgrades to public; a name or a URL parameter alone keeps the finding reported at medium with the evidence in
meta.What changes
token/jwt/sig/signature/access_token/X-Amz-*URL parameter with anexp, no role, and either aurlclaim or the/object/sign/storage path in the URL is labelledSigned URL Token (JWT), still medium and in the output, withexpiresAt,expiredand a hint. A session or user JWT in?token=, aservice_rolekey, an admin scope, a role-carrying token and a token with noexpare never labelled this way.apiKeyas the key of the object that is the argument ofBugsnag...(/amplitude...(or the value ofbugsnag:/amplitude:(the SDK must be the immediately enclosing call or object);data-*-api-key/data-*-access-tokenon a<script src>from another host (secret-named attributes are not claimed); RevenueCat prefixes (appl_,goog_,amzn_,strp_,rcb_+ 28-40 alnum with a digit) within 200 characters ofPurchases/RevenueCat.apiKey/accessTokenis the secret key or has no distinctive shape).NEXT_PUBLIC_/NUXT_PUBLIC_/VITE_/PUBLIC_env names andpublic*/publishable*/client*Keynames (privileged words disqualify even the hint); no hint for ansk_/rk_/sb_secret_value.AKIAid (no 40-character base64-alphabet value within 300 characters, keyed or not) ismediuminstead ofhigh, still visible, withmeta.pair. An id beside any such value stays high.Verification
leaked-secrets-public-clients.test.ts; harness fixtures for the AWS id (now medium alone, high with a secret) updated; snapshot churn confined to AWS and the RevenueCat generator. Suites pass by path,tsgo,make validate, detect-secrets hook clean. Codex pass not run (MCP unavailable).Probes (bypass and false-negative)
img src,srcset,og:image, inline JSON,?jwt=,?sig=,?signature=?token=/?access_token=(nourlclaim, no sign path)?token=JWT). Fixed: plain JWT. A token with no url claim under the/object/sign/path is labelledexp;role: authenticated;service_role; admin scope;sb_secret_in the URLdatadogSetup({apiKey}),new Rollbar({accessToken}),Crisp.configure,Tawk_API.init// bugsnag, clean configthenvar sendgrid={apiKey};/* amplitude */ var svc={apiKey};Bugsnag.start({other:1}); var svc={apiKey}Bugsnag.start({apiKey}),amplitude.getInstance().init({apiKey}),bugsnag={apiKey}data-secret,data-tb-secret,data-client-secret,data-password,data-aws-secreton a third-party scriptdata-api-keyon a third-party script;data-api-keyon a first-party scriptgoog_ModuleLoaderConfigurationData1xx, prefix + 28-40 alnum with noPurchases/RevenueCatwithin 200 charsNEXT_PUBLIC_X_API_KEYholdingsk_live_...;client_secret_key,publicPrivateApiKey;NEXT_PUBLIC_SECRET_KEY,VITE_PASSWORD["AKIA...","<40>"],{id, secret:"<40>"}, a secret 250 characters awaypairAKIA..._PRODtokenSecret Key (provider unknown)?token=eyJleads, 40k widget attributes, 2.5k long public-looking names, 40k AKIA idsRebase 2026-11-01
Rebased on main (v0.0.156, 99f63d3) as part of the stack 1298 -> 1300 -> 1318 -> 1319 -> 1320; CHANGELOG bullets re-inserted under [Unreleased];
.secrets.baselineline numbers refreshed (no new entries). Fixed: the corpus test (security/leaked-secrets.test.ts) never finished on the original head: the RevenueCat generator could not fire bare (the pattern needs the SDK name beside the value), and draw() retried for ever. The generator now carries a key name and skips contexts that spell their own key names, draw() fails after 500 attempts instead of hanging, and the snapshot (expected.json) was regenerated (the AWS pair hint wording had drifted from the stale snapshot). Draft: corpus A/B pending.Review round (stack rebased on v0.0.157)
Signed URL Token (JWT)now needs ALL of anexp, aurlclaim and a token/jwt/sig/signature/access_token/X-Amz-* query parameter, and no role or admin scope. Aurlclaim without the parameter, a user or API token inside a/object/sign/URL (nourlclaim), and role/admin-scope tokens are not labelled (they keep their own tier). The host is not checked: the label never lowers a finding (medium, visible). A Supabase-issued token with an admin scope is a Supabase JWT, not a grant.?token=keep their own classification; service_role and admin scope stay high; the order of returns and theaccept(value, content, index)hook from fix(rules): leaked-secrets samples, placeholders, base64 runs, prefix collisions, Paystack labelling #1283 #1227 #1298 are intact.amplitude.init(fn(), {...})), the RevenueCat 28-to-40 character tail with a digit in its first 40, and thedata-bugsnag|amplitude|revenuecat-api-keyattributes on third-party vs first-party script tags are pinned.draw(), regenerated snapshot).Skill change: none.