Repository navigation
Conversation
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.
The plaintext-secret gate scans entitlement-shaped files:
panel,license,vault,auth,gate,entitlementby basename (or as a path segment) across the known JS/HTML/TS extensions. That scoping keeps the false-positive budget low, but it also means a high-entropy key written insrc/config.jsis never reported, because the file's name does not match the filter and it is not even read. This adds an opt-in that widens discovery to every JS/HTML/TS source, and leaves the default exactly as it was.What changed
discoverAndLintPlaintextSecretsgains ascanAllFilesoption, andwalkTargetsaccepts every scanned source when it is set while keeping the entitlement-shaped filter when it is not (src/engine/plaintext-secret-lint.ts).scanPackagingGatesgainsplaintextSecretScanAlland threads it into the plaintext discovery call (src/engine/packaging-gates.ts).bla lintgains--plaintext-secret-scan-all, and the MCPbla_linttool gainsplaintext_secret_scan_all(src/cli.ts,src/mcp/server.ts).tests/plaintext-secret-scan-all.test.tscovers both layers: a secret insrc/config.jsis skipped by default and reported once the flag is set, for the discovery function and for the unified gate scan.Why this matters
The gate is the last stop before a cleartext secret ships, and a basename heuristic is a reasonable default. But a user who wants coverage across the whole source tree currently has no way to ask for it. This gives them one without loosening the default for everyone else.
Tests
npx vitest run tests/plaintext-secret-scan-all.test.ts tests/plaintext-secret-lint.test.ts tests/packaging-gates.test.ts tests/packaging-gate-exhaustiveness.test.ts tests/cli-flag-validation.test.ts tests/mcp-engine-capability-parity.test.tspasses, 48 tests.npx vitest run tests/mcp-lint-seal.test.ts tests/mcp-agent-contract.test.ts tests/lint-sarif.test.ts tests/hardening-cli-mcp-setup.test.tspasses, 34 tests with 2 skipped.Compatibility
The default is unchanged: without the flag the gate scans exactly the files it scanned before, so the existing false-positive budget is preserved. The flag is additive on the CLI, in the MCP schema and in the scan options.