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:

ListWhat it doesUse it when
pre_judge_stripsRemoves text from the judge's input before it reads itSender labels or bridge banners keep tripping the PII judge
finding_suppressionsDrops one judge finding when its ID and the matched text both matchA finding fires on safe values, such as Unix timestamps or chat IDs
tool_suppressionsDrops listed PII-judge findings for tools whose name matchesA 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:

policies/guardrail/default/suppressions.yaml (excerpt)
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

  1. 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.

    --finding is matched against the whole finding ID, so JUDGE-PII-.* matches every PII finding. --entity is matched against the text the judge reported; leave it out to match every value. --reason is required. Add --connector X or --profile P to narrow the scope.

  2. 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
  3. 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:

policies/guardrail/default/suppressions.yaml (excerpt)
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.

Next: give a group its own policy, what the judge does.