Suppression cookbook
Patterns for tuning DefenseClaw's three LLM-judge suppression layers — pre-judge strips, finding suppressions, and tool suppressions — without losing real signals.
Suppressions tune the optional LLM judge (how the judge works). They never silence a regex or CEL rule finding (such as SEC-AWS-KEY), and they never redact the request sent to the model. To quiet a rule, use defenseclaw guardrail rule disable or rule severity (rules reference).
Every rule pack has three lists in suppressions.yaml:
| List | What it does | Use it when |
|---|---|---|
pre_judge_strips | Removes text from the judge's input before it reads it | Sender labels or bridge banners keep tripping the PII judge |
finding_suppressions | Drops one judge finding when its ID and the matched text both match | A finding fires on safe values, such as Unix timestamps or chat IDs |
tool_suppressions | Drops listed PII-judge findings for tools whose name matches | A status tool returns account metadata the judge calls a user name |
Suppressions never silence rule findings
They act on the LLM judge only. A regex or CEL rule finding, such as SEC-AWS-KEY, is never suppressed, and the request sent to the model is never redacted. To quiet a rule, use defenseclaw guardrail rule disable or rule severity (Rules and custom packs).
Don't blanket-match
Never use .*, .+ or ^.*$ as a suppression pattern. It silences everything the list would report.
Pre-judge strips
Strips and tool suppressions live in a pack. Copy a pack (write a custom rule), edit suppressions.yaml, then validate and pin it. This entry ships in the default pack:
pre_judge_strips:
- id: STRIP-SYSTEM-SENDER
pattern: '\b(cli|system|bot|admin)\b'
context: "System sender metadata injected by agent framework"
applies_to: [pii]A strip removes every match from the input of each judge in applies_to (all judges when empty). It does not hide a secret: the SEC-* rules still match it.
Finding suppressions
A finding suppression drops one judge finding when its ID and the matched text both match. Use it when a finding fires on safe values, such as Unix timestamps or chat IDs. To add one without copying a pack, see the next section.
Finding suppressions in config.yaml
-
Add a finding suppression to
config.yaml.defenseclaw guardrail suppress add ACME-SUPP-BUILD-EMAIL \ --finding JUDGE-PII-EMAIL --entity '@build[.]acme[.]example$' \ --reason "Build bot addresses are not personal data"OK Suppression ACME-SUPP-BUILD-EMAIL added for every connector. Saved (config generation 11). The gateway isn't running; it loads this when it starts.--findingis matched against the whole finding ID, soJUDGE-PII-.*matches every PII finding.--entityis matched against the text the judge reported; leave it out to match every value.--reasonis required. Add--connector Xor--profile Pto narrow the scope. -
Check it worked.
defenseclaw config get guardrail.rules.suppressions- entity_pattern: '@build[.]acme[.]example$' finding_pattern: JUDGE-PII-EMAIL id: ACME-SUPP-BUILD-EMAIL reason: Build bot addresses are not personal data -
Remove it later.
defenseclaw guardrail suppress remove ACME-SUPP-BUILD-EMAIL
The id must be new. The command takes no condition; use a pack-level suppression for is_epoch or is_platform_id.
Tool suppressions
This entry ships in the default pack:
tool_suppressions:
- tool_pattern: '^(graph_auth_status|session_status|get_status)$'
suppress_findings: [JUDGE-PII-USER]
reason: "Status check tools return expected system metadata"Scope tool_pattern to exact tool names. ^.*$ drops the listed findings for every tool.
Next
All shipped entries are in the recipe catalog.
Recipes
Catalog of the regex rules and suppressions shipped with DefenseClaw's bundled policy packs — search, filter, and copy the YAML.
Regex cookbook
RE2 regex patterns for DefenseClaw guardrails, quoted from the shipped strict pack — secrets, prompt injection, exfiltration endpoints and enterprise data — with what makes each one precise.