enforce-redaction-gate
Installation
SKILL.md
Enforce Redaction Gate
A redaction gate is the privacy-boundary analogue of an AST checker: it parses what is about to ship and refuses to let a deny-listed shape through, returning a machine-checkable verdict rather than a human opinion. This skill builds that gate as a single executable that any transform skill or CI job can call to verify its output. Two tiers cooperate — a fast shape-based deny-list and a slower structure-aware pass — so the gate catches both literal token leaks and the structural leaks a line-grep misses.
When to Use
- Gating a public mirror or disclosure draft before publish (the blocking check, not a warning)
- Verifying the output of a redaction transform (
redact-visualization-for-disclosure,redact-wire-capture) actually cleared every pattern - Adding a CI step that fails the build when a sensitive identifier shape appears
- Replacing an ad-hoc
grep -r secretwith a maintained, exit-code-contracted, structure-aware checker - Auditing an already-published tree after a near-miss to confirm nothing slipped through
Inputs
- Required: A target tree or file set to scan (the artifact about to ship)
- Required: A deny-list of sensitive identifier shapes (regexes), kept in the private source repo — never published
- Optional: A structure map — which file types carry structured content (JSON keys, HTML attributes, SVG text nodes, code identifiers) and which positions are sensitive
- Optional: A CI context (the gate runs the same locally and in CI)