Benchmark PII and secret redaction skills that scrub sensitive payloads before LLM or API calls
Compare local presidio, regex+NER, and reversible tokenization skills on catching API keys, SSNs, and patient IDs without mangling code.
Copy the prompt and paste it into the AI assistant you already use.
Probabilistic NER redaction never guarantees 100% recall; verify BAA/DPA agreements with LLM providers when processing regulated PHI or PII.
How to evaluate PII and secret scrubbing skills
- 01
Run redaction locally before cloud API egress
A cloud prompt instructing the LLM to 'ignore SSNs' still transmits raw PII over the wire; scrubbing must execute locally first.
- 02
Use consistent placeholder mapping (<EMAIL_1>)
Replacing every entity with identical '[REDACTED]' breaks multi-user logic; indexed tokens preserve relational reasoning.
- 03
Test false-positive rates on technical strings
Aggressive phone/ID regexes often corrupt 10-digit Unix timestamps, git commit hashes, and package version numbers.
- 04
Benchmark entropy + prefix secret scanners
Combine deterministic prefix rules (sk-ant-, ghp_, AKIA) with high-entropy detection for custom internal tokens.
Questions and answers
Why does consistent placeholder tokenization matter for agent accuracy?
If Alice and Bob both become '[REDACTED]', the agent cannot tell whether a billing transfer happened between one account or two distinct users.
Are these redaction tools executed as deterministic local scripts?
Yes, top-ranked privacy packages run local Python/Rust hooks (Presidio, Gitleaks/TruffleHog rules, or ONNX NER) prior to remote LLM invocation.
How do benchmarks score recall versus code corruption?
Suites mix planted AWS/Stripe keys and multilingual PII inside real stack traces and JSON logs, requiring >99% secret recall and <1% technical corruption.
Related tasks in this category
See all in Skill Security, Injection & Permission Audits-
Scan third-party SKILL.md packages and reference files for covert prompt injection
Community skill bundles can hide Unicode tag characters, poisoned reference docs, or stealth instructions inside helper scripts.
-
Audit MCP server OAuth scopes, API token handling, and credential storage hygiene
Many community MCP connectors ask for full repo admin or Gmail read/write/delete scopes when your workflow only needs read access.
-
Test agent skills for covert data exfiltration via Markdown images, DNS, or webhooks
Even without write tools, a compromised skill or untrusted webpage can exfiltrate workspace secrets via rendered Markdown URLs or query strings.
-
Verify destructive command blocking and sandboxing in Bash-enabled agent skills
Check whether CLI-driven skills block force-pushes, recursive deletes, prod profile mutations, and subshell bypasses cleanly.
-
Check commit pinning, lockfile hashes, and maintainer provenance in community skill packs
Installing skills from floating GitHub branches or unpinned uvx/npx commands exposes developer laptops to upstream repo takeovers.
-
Verify stateful agent skills and memory MCPs never leak context across customer workspaces
Local memory files, shared tmp directories, and unscoped vector collections can bleed Customer A's context into Customer B's session.