Repository navigation
Conversation
nc9
force-pushed
the
fix/1287-1229-secrets-public-tier
branch
2 times, most recently
from
October 30, 2026 02:27
254b021 to
1daf931
Compare
This was referenced Oct 30, 2026
nc9
force-pushed
the
fix/1287-1229-secrets-public-tier
branch
4 times, most recently
from
November 1, 2026 11:49
d953cce to
d01fc58
Compare
This was referenced Nov 1, 2026
nc9
force-pushed
the
fix/1287-1229-secrets-public-tier
branch
from
November 1, 2026 13:12
d01fc58 to
c4179ed
Compare
4 tasks
nc9
force-pushed
the
fix/1287-1229-secrets-public-tier
branch
4 times, most recently
from
November 1, 2026 18:47
bd8051d to
7dc919a
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]>
nc9
force-pushed
the
fix/1287-1229-secrets-public-tier
branch
from
November 1, 2026 19:54
7dc919a to
de4eb53
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 #1287
Fixes #1229
Depends on #1298 (this branch is rebased on it; merge #1298 first, then this PR shows only its own diff).
Extends the public-by-design tier of
security/leaked-secrets, on one rule: a finding moves to the informational tier only on positive evidence in the token or right beside it. Public and info findings are absent from the JSON audit output, so a downgrade is effectively a drop for machine consumers; anything the evidence does not cover keeps reporting. Review (review-pub-secrets) found the first version of this PR broke that rule in several places; this is the corrected version.What changes
merchantId+merchantOrigin, registered claims andexpiresAtonly, signed, no role/admin): public.client_id+unique_id): public only with ahttps://shopifyinc.com/sessionsURL (parsed, not matched) beside it. The claim names alone no longer qualify.data-netlify-cwv-tokenattribute, withiss: netlify, only the web-vitals ids, signed.apiKeyassignment (only that one assignment type) in a Shopify platform bundle:cdn.shopify.com/shopifycloud/, or/cdn/shopifycloud/on any host when the bundle names Shopify at least three times. Secrets, tokens, AWS keys and provider keys in the bundle still report.api-key/data-api-keyonapps.shopify.com(parsed host): not reported.AKIA/ASIAid in a presigned URL: informational only with BOTHX-Amz-SignatureandX-Amz-Expires(the first version relaxed this; reverted).search_api_keyetc. reports at medium as before, with ameta.hintsaying the name suggests a search-only key and that an admin key under the same name reads the same. Typesense client config likewise unchanged.alg: none/ noalg) are never claimed.Deliberately not done
shpat_/shpca_/shppa_Shopify admin tokens have no detector on main. The detector lands in the security/leaked-secrets: Cerebras keys missed, sbp_ mislabelled as service role (it's a personal access token), no patterns for OpenRouter/Google client secret/Shopify Admin/Stripe restricted keys #1309 PR (named patterns, high, critical in a script), which also covers the security/leaked-secrets: Shopify platform tokens (wallet JWTs, Shop sessions JWT, portable-wallets key) flagged on 37% of Shopify stores #1287 criterion "a real Shopify admin token still reports". Not duplicated here to avoid a conflict.search_api_key/ Typesense / consent JWT / presigned-without-expiry are intentionally not met as written, for the reason above. Say so if you want them with a weaker guarantee.Verification
tsgo --noEmit,make validate, detect-secrets hook clean. Rebased on fix(rules): leaked-secrets samples, placeholders, base64 runs, prefix collisions, Paystack labelling #1283 #1227 #1298; a dry-run merge with feat(rules): add leaked-secret source metadata #1277 conflicts only in CHANGELOG and.secrets.baseline.No new rule. Skill change: none.
Bypass probes and results
Every row is a test in
leaked-secrets-public-tier.test.ts.ALGOLIA_SEARCH_API_KEY,searchOwnerKey,search_sudo_api_key,searchIndexingApiKey,azure_search_api_key,search_admin_api_keyholding an admin key; Typesense config with an admin key{searchApiKey:"K", adminApiKey:"K"}/cdn/shopifycloud/onevil.testor any host with no Shopify in the bundle; a bundle withpassword/secret/client_secret/aws_secret_access_key;../,%2e%2e,?/cdn/shopifycloud/,#...,cdn.shopify.com.evil.test,[email protected]apiKey, only evidence-backed hosts/bundles. All others report. Residual: a hostile site that serves/cdn/shopifycloud/x.jscontaining the word "shopify" three times hides anapiKeyassignment in that file onlyalg: nonefrom onetrust.com; API-token-shaped tokens withissapi.transcend.io/api.didomi.ioclient_id+unique_id+client_account_id, no Shopify contextadmin:true,is_admin,email,permissions,scope,role; escaped (admin), duplicate (roletwice) and__proto__claimsalg: noneor noalgX-Amz-Expires; signature alone; scope alone; id in a non-credential parameter; bare iddata-netlify-cwv-token, indata-otherapps.shopify.com.evil.test,[email protected],data-secreton the listingsk_live_in a/cdn/shop/theme assetControl regression
The private real-site corpus run on main vs the #1298 base shows 0 findings removed or added; this PR's rules do not fire on it either way.
Final review round
The
/cdn/shopifycloud/skip now requires a Shopify host by parsed hostname (cdn.shopify.comwith/shopifycloud/, or*.myshopify.comwith/cdn/shopifycloud/). Mentions of "Shopify" in the file no longer matter; a custom-domain shop's copy is not recognised and reports like any other script. Tests:evil.test,acme.myshopify.com.evil.test,myshopify.com.evil.test,cdn.shopify.com/cdn/shopifycloud/with the word Shopify repeated ten times all report.Rebase 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). Draft: corpus A/B pending.Review round (stack rebased on v0.0.157)
apiKey/api_key/api-key/data-api-keyassignment on that host, in markup or script (a first-party host rule: Shopify's own site). The docs and CHANGELOG now say exactly that; tests pin inline, external and attribute forms, other hosts, and that other credentials on the page still report.search_api_key(or a Typesense key) keeps MEDIUM with a hint; it is not downgraded, because the same name can hold an admin key. The AC is amended by lane-review-prs to this behaviour.shpat_is still reported": noshpat_/shpca_/shppa_/shpss_detector exists in this PR or on main; it is the security/leaked-secrets: Cerebras keys missed, sbp_ mislabelled as service role (it's a personal access token), no patterns for OpenRouter/Google client secret/Shopify Admin/Stripe restricted keys #1309 work in feat(rules): leaked-secrets names Cerebras, OpenRouter, NVIDIA, Fireworks, Shopify Admin, Stripe restricted, Google OAuth secrets; sbp_ is a PAT #1309 #1318 (next in the stack), which tests all four prefixes (a bareshpat_+ 32 hex reports high).Skill change: none.
Delta review leftovers
Tests added for the surviving mutants: the Netlify attribute anchoring (spaces around
=, case, quotes, a later attribute, a value before the token, a longer attribute name), the/cdn/shopifycloud/path on*.myshopify.comversus the bare/shopifycloud/oncdn.shopify.com, and every registered claim includingexpon the wallet, session and Netlify tokens (any other claim is not allowed). Mutants for each fail a test.Skill change: none.