Repository navigation
Conversation
added 3 commits
October 3, 2026 19:56
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.
Summary
hooks/rules.ts: aprivate-key-truncatedrule for PEM blocks pasted without their END line; the full-block PEM cap raised from 16384 to 65536 body characters; a bounded base64 decode pass inscan()that reports a prefix-shaped token wrapped in base64 as one hit with a-base64id; keyword boundary, identifier, placeholder and literal-escape guards on the generic rules; placeholder password slots dropped fromdb-connection-url. 24 secret rules and 7 PII rules.tests/rules.test.ts: fixtures for every change (115 positives, 162 negatives), a full-block-beats-truncated test, a JWT-stays-jwt test,offwith-base64ids, a second 2 MB performance test. Kit: 65 pass, 0 fail.tools/fp-corpus.mjs,tools/fp-corpus-results.md,tools/fp-corpus-labels.json: a reproducible scan of 11 public repositories at pinned commits (42,836 text files); every secret-rule hit labelled by hand. Result after the rule changes: 68 hits, 60 real test keys and vectors, 8 fixtures, 0 false positives.hooks/register.ts: theredact:prefix is dropped from the mod's own log lines and command output, because the engine already prefixes the plugin name (the screen readredact: redact: hid ...).README.md,plugins/redact/README.md,DECISIONS.md,RULES.md,site/index.html: the live interactive run (prompt echo with the placeholder,Writecarrying the placeholder, the file on disk holding the real key), a per-surface proof table, precise limitations (the three host bookkeeping records stored as made,tool_useblocks not rewritable), the corpus section, the new rule counts, site tokens aligned to anthropic.com's live CSS, canonical and Open Graph meta tags on the site, and the 1280x640 preview image shipped as site/social-preview.png. Line counts in the README are drift-proof (about 130, under 100).Details
The three misses and the false-positive causes came from an adversarial pass that reran the rules with Node on crafted inputs and on the public corpus. The engine puts
tool_useblocks back as made, so that one is documented rather than fixed. The live run was driven in tmux against a logged-in isolated config; captures are quoted as text in the README with the fake key masked.Test plan
claude plugin validate plugins/redact --strict(passed)CLAUDE_CONFIG_DIR=<isolated> claude plugin test plugins/redact: 65 pass, 0 fail (passed)tsc -p plugins/redactexit 0 (passed)node tools/fp-corpus.mjsreproduces 68 hits, 0 false positives, 0 unreviewed (passed, 9 s with cached repos)