fix(review): hard-block generic secret assignments#5493
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - fixes requiredReview updated: 2026-07-12 23:23:14 UTC
🛑 Suggested Action - Manual Review Why this is blocked
📋 Copy for AI agents — paste into your coding agentCI checks failing
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5493 +/- ##
==========================================
- Coverage 94.46% 94.42% -0.04%
==========================================
Files 554 554
Lines 44426 44420 -6
Branches 14663 14661 -2
==========================================
- Hits 41967 41944 -23
- Misses 1784 1801 +17
Partials 675 675
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Closing as a regression, not a fix. This reverts a deliberate, heavily-documented same-day fix: Main already catches real leaks here — The PR's own test diff is the clearest signal: it rewrites the describe block titled "generic_secret_assignment is advisory-only, never a hard blocker (#5346)" — a regression guard for the #5341/#5346 incidents — to assert the opposite, and deletes the test asserting No action needed; flagging for visibility. |
Motivation
password = "long-random-service-secret") must not bypass the automated gate after placeholder filtering, otherwise real secrets can be merged unnoticed.generic_secret_assignmentto advisory only and created a security regression where committed passphrases/client secrets could slip through unless they matched a provider-specific regex.Description
generic_secret_assignmentas a hard-blocking kind inHARD_SECRET_KINDSso placeholder-filtered generic assignments are treated as gate-blocking secrets (src/review/secret-patterns.ts).HARD_SECRET_KINDS(including generic assignments after filtering) as asecret_leak/ critical finding and include exact locations (src/review/safety.ts).src/review/content-lane/security-scan.ts).test/unit/secret-patterns.test.ts,test/unit/content-lane-security-scan.test.ts,test/unit/safety-wiring.test.ts,worker-configuration.d.ts).Testing
npx vitest run test/unit/secret-patterns.test.ts test/unit/content-lane-security-scan.test.ts test/unit/safety-wiring.test.tsand all tests in those suites passed.npm run typecheckandnpm run cf-typegen/npm run cf-typegen:checkto regenerate and validate worker types, and both checks completed successfully after regeneratingworker-configuration.d.ts.npm run engine-parity:drift-checkwhich completed OK for the engine twin pairs.npm run test:coverage) and the repo-wide coverage thresholds failed (project-wide coverage is intentionally strict and the targeted runs were used to validate behavior);npm audit --audit-level=moderatecould not complete in this environment due to the registry endpoint returning 403.Codex Task