Repository navigation
test(batches): rename the two seeded-batch labels that gitleaks reported as secrets - #13729
Conversation
The API-key names "wvxc-route-401"/"wvxc-route-500" in tests/unit/batches-delete-completed-route-scope.test.ts are literal test labels, not credentials; gitleaks generic-api-key flags them because they sit on a createApiKey() call. Every /omni-code-sec run on a branch that touches that file re-raised them as two formal blockers (LEDGER-2/3 of the 2026-09-14 proof run). Allowlisted by regex with the mandatory justification comment; review at v3.9.0 like the other entries. Verified: gitleaks 8.30.1 detect --no-git on the test file → 0 findings; scripts/check/check-secrets.mjs → secretFindings=1 (unchanged vs the base tip: the remaining hit is the pre-existing sk-internal-test-key-12745 label in src/lib/memory/__tests__, out of scope here).
|
CI triage (2026-09-15): the three red checks are all base-reds inherited from
Green here: Unit Tests ×4, Vitest, Fast Quality, semgrep, Docs Gates, Merge integrity (changelog half), No new. |
…tleaks allowlist Resolves LEDGER-2 and LEDGER-4 of the omni-code-review battery on this branch (run 2026-09-15_fix-gitleaks-allowlist-wvxc-labels_vs_release-v3.8.51). The labels "wvxc-route-401"/"wvxc-route-500" are the label argument of seedCompletedBatch() (batch file name), not API-key names; gitleaks generic-api-key flagged them because the preceding key?.id argument supplies the 'key' keyword and the literal is >= 10 chars. Renaming them to route401 / route500 (8 chars, under the rule's floor) removes the finding at the root, so the allowlist entry and its inaccurate justification are dropped and .gitleaks.toml is back to the base tip. RED → GREEN (gitleaks 8.30.1 detect --no-git on the test file, base config): 2 findings before the rename, 0 after. The suite itself still passes.
…hten the fragment Round 2 of the omni-code-review battery (LEDGER-6..9): the constraint that route401/route500 must stay under the gitleaks generic-api-key length floor lived only in the commit message once the allowlist comment was dropped — now stated at both callsites; the changelog fragment names the exact trigger (a scan that reads those lines) instead of 'a branch touching that file'.
…seedCompletedBatch Round 3 of the omni-code-review battery (LEDGER-6/8/10): the callsite comment claimed that any 10+ char literal after key*.id trips generic-api-key, but the rule also needs Shannon entropy >= 3.5 — eleven long word-shaped siblings in this file are clean. The rule is now stated once in a docblock above the helper (length floor + entropy floor + the key keyword) and both callsites point at it instead of restating it positionally.
|
Base-red discriminator for head
None of the five touches the two files of this PR (a test-label rename + a changelog fragment). The three reds of the previous head (API Route Typecheck / Docs Gates / Merge integrity) went green once #13730, #13635 and #13678 landed on the release. Green on this head: API Route Typecheck, CodeQL ×4, Docs Gates, Merge integrity, No new ESLint warnings, Vitest, semgrep ×2, Change Classification. Merging with |
…ted as secrets (cheaper-inference#13729) The labels wvxc-route-401/wvxc-route-500 sat right after a key*.id argument and cleared the gitleaks generic-api-key length and entropy floors; renamed to route401/route500 with a docblock stating the measured rule. Test-only; .gitleaks.toml untouched. Reviewed by 3 rounds of /omni-code-review (37 agents).
Why
Every
/omni-code-secrun on a branch touchingtests/unit/batches-delete-completed-route-scope.test.tsre-raised two formal blockers from its git-modegitleaksscan (generic-api-keyon the literals"wvxc-route-401"/"wvxc-route-500", LEDGER-2/3 of the 2026-09-14 proof run). They are thelabelargument ofseedCompletedBatch()(the seeded batch's file name), not credentials; the rule fires because the precedingkey?.idargument supplies itskeykeyword and the literal is ≥ 10 chars.What (after the
/omni-code-reviewbattery on this branch — 15 lenses, run2026-09-15_fix-gitleaks-allowlist-wvxc-labels_vs_release-v3.8.51)The first version of this PR allowlisted the labels in
.gitleaks.toml. The battery found (LEDGER-1, 16 lenses) that the justification comment was factually wrong and (LEDGER-2, 12 lenses) that the repo's allowlist policy requires fixing the cause when it fits in the same PR. Approved plan at P3: rename the labels, no allowlist.tests/unit/batches-delete-completed-route-scope.test.ts: the two seeded-batch labels becomeroute401/route500(3 lines) and a docblock aboveseedCompletedBatch()records the measured rule (10+ chars and Shannon entropy ≥ 3.5 right after akey*.idargument). Test-only change; no production code..gitleaks.toml: untouched vs the base tip (the allowlist entry from the first revision is gone).changelog.d/maintenance/13729-rename-wvxc-route-test-labels.md: accurate fragment.Review rounds (
/omni-code-review, run2026-09-15_fix-gitleaks-allowlist-wvxc-labels_vs_release-v3.8.51)seedCompletedBatch(LEDGER-6/8/10 FIX)Round cap (3) reached: the round-3 fix (docblock wording) is verified by gitleaks / prettier / eslint / the suite, not by a 4th battery round.
Validation (Hard Rule #18 — RED → GREEN with the tool that reported the defect)
gitleaks 8.30.1 detect --no-git --config .gitleaks.toml --source <test file>before the renamegitleaks git --log-opts="origin/release/v3.8.51..HEAD"(what the security battery runs)node --import tsx/esm --test tests/unit/batches-delete-completed-route-scope.test.tsnode scripts/check/check-secrets.mjssecretFindings=1— unchanged vs the base tip (the CI ratchet scanssrc/open-sse/bin/electron/scripts, nevertests/; the one hit is the pre-existingsk-internal-test-key-12745label insrc/lib/memory/__tests__, out of scope)modelTestRunner.tsTS2741, fix in #13730), env/docs contract, agent-skills-sync dry-run; all reproduce on the base tipc0f92ec9(see the triage comment below).Refs #13377 (hygiene bundle), #13684.