Repository navigation
Conversation
nc9
force-pushed
the
fix/1292-1308-secrets-generic-gates
branch
4 times, most recently
from
November 1, 2026 11:59
81b170c to
84c5634
Compare
nc9
force-pushed
the
fix/1292-1308-secrets-generic-gates
branch
2 times, most recently
from
November 1, 2026 15:00
e8a21e3 to
5c763f3
Compare
nc9
force-pushed
the
fix/1292-1308-secrets-generic-gates
branch
3 times, most recently
from
November 1, 2026 18:47
eb6da46 to
cad5406
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]>
nc9
force-pushed
the
fix/1292-1308-secrets-generic-gates
branch
from
November 1, 2026 19:54
cad5406 to
11a8f92
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 #1292
Fixes #1308
Depends on #1298, #1300 and #1309 (a chain on one file; merge in that order and this PR shows only its own diff).
A plausibility gate on the three generic assignment patterns and an exemption for credentials that are sample data. Per the maintainer's decision, a plain word under a credential-named key (
password:"changeme") keeps reporting: the pinned corpus negative is unchanged, and #1292 has a comment saying so. The gate only skips values that cannot be credentials by shape.What changes (#1292)
Not reported under a generic assignment (shape only; a drawn value falls into none): a key repeated as its value or a translated label (already), lower-case words joined by
_,:or.(each at most 8 characters, at most two digits:app_secret_v6; a capital, a longer word or-joiners read as drawn, soProd_token_8fK2mQ9xand hyphenated passphrases are not covered), CSS-module classes (-module__,__x___y), a URL or path with no credential in it (no run of 20+ characters, no 6-character piece with a digit, no query value of 8+, no userinfo; so a long letters-only path secret andhttps://hooks.zapier.test/hooks/catch/123/abc/still report), an env reference (process.env.NAME,import.meta.env.NAME,${NAME};$ADMIN123andenv.Secret9x!are passwords), a short elided stub (12 or fewer characters then.../…) and masks, and a code span (===/!==, or with a;:=>,&&,||,function,return,;var, a statement after the;; or unbalanced parentheses around a member access).Reversed after review:
0x+40 hex, bech32secret1..., long snake identifiers andName_key_hashall keep reporting (positive evidence only).What changes (#1308)
example.com/.org/.net,.test,.example,.invalid,.localhost; NOT.local) is sample data: not reported.Possible Demo Login (seed data table)at medium with a hint.FLAG{, a stringflag/flagPath/flagValue,candidates: [, acrack...key,sample+options,options+length), or one marker inside a table of 3+ same-shaped records. One marker alone never skips.Verification
leaked-secrets-sample-data.test.ts, each class paired with a control; the existing corpus negative forchangemeis restored to its original wording. Suites pass by path (2436 + 296),tsgo,make validate, detect-secrets hook clean. Codex pass not run (MCP unavailable).Probes (bypass and false-negative)
changeme,Summer2024!,Passw0rd123underpasswordCorrect-Horse-Battery-Staple-Ponyapp_secret_v6,secret:reset:token,auth.token.valuekqzvmplxwn_rtbhdgcsyj_fmaoeiuqzkunderapi_key,Prod_token_8fK2mQ9xundersecrethttps://hooks.zapier.test/hooks/catch/<7 digits>/<8 alnum>/,https://user:<pw>@host/x,?key=<12 letters>,https://hooks.acme.test/services/<32 letters>0x+40 hex,secret1+38 lowercase undersecretZx9&&Kw3mQ7,return-of-the-king-2024,a=>bQ9x7Lm2K, `p{flag:"beta",password:"<real>",host:...},{secret:"<real>",options:{retries:3,length:10}},{password:"<real>",candidates:[1,2]},{flagPath:"/x",password}crack*+candidates+flagPath), generator (sample+options/length), one marker in a 3-row table@corp.localtable; mixed domains; two rows; differently shaped rows;[{name,secret}]with no emails.localas reserved: fixed); demo login; generic; generic; genericflags:{beta:true},flag:true,featureFlags:[...]beside a real password[, 15k elided values, 40k[{a:1},prefixesRebase 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: EMAIL_HOST_RE and KEY_IN_ROW_RE are registered with sharedRegex (tests/shared-regex.test.ts was red on the original head). Draft: corpus A/B pending.Review round (stack rebased on v0.0.157)
KEY_IN_ROW_REkeys are bounded to 64 characters and email hosts are found from each@with a one-character look behind and a bounded read ahead (emailHosts). A test with 250 tables of three rows, one holding a 7,000-character run, finishes in under a second (10.4 s with the unbounded key regex).example.comemail now reports; rows with reserved-domain emails stay a sample whatever else the array holds; one real-domain row among the secret's own rows keeps the table reporting.authentication_secret_v6, up to sixteen-character words then_vand one or two digits) is a name. bech32 and0xaddresses keep reporting by design (a 64-hex0xvalue is also a private-key shape); the AC is amended by lane-review-prs._,:or., as the code does.Skill change: none.
Joined-identifier gate narrowed
The gate dropped almost every random lower-case value joined by
_or:(words of at most eight characters, at most two digits), includingBearerandBasicheader values. It now needs at least one word that names a credential (secret, token, key, pass, pwd, auth, cred, api, private, bearer, session, sign, salt, jwt, login, access), and the value of a Bearer or Basic header is never read as a name. The versioned-key rule goes through the same path. The twelve catalogue names stay dropped (tested); 600 random neutral joined values (words without a credential word,_and:) are dropped by the gate in zero cases (the control is the same words joined by-, which the gate never reads; dotted names are dropped by the older dotted-catalogue rule, not this gate). Mutants (no credential-word requirement, no Bearer/Basic exemption, a one-word list) fail a test. Docs and CHANGELOG match.Skill change: none.