Skip to content
Cisco AI Defense logo
CiscoAI Security

Tuning — DefenseClaw

Overview

Guardrail tuning is smaller than the previous docs implied. The code exposes mode, scanner mode, flat detection-strategy overrides, judge settings, rule-pack directory, stream buffer size, and OPA data thresholds. It does not expose action_threshold, nested strategy, nested multi_turn, or nested streaming blocks under guardrail:.

Safe rollout shape

Rendering diagram…
PhaseSource-backed settingGoal
Observeguardrail.mode: observeRecord alerts without enforcing blocks.
Tighten detectiondetection_strategy*, judge_sweep, scanner_modeIncrease or decrease local, judge, and remote scanner participation.
Tune deterministic rulesrule_pack_dir and rule YAMLAdd, remove, or change regex rules and suppressions.
Tune final policypolicies/rego/data.json guardrail thresholdsChange OPA block/alert threshold data when using Rego policy evaluation.
Enforceguardrail.mode: actionEnforce scanner or OPA block decisions in-band.

Strategy tuning

SettingUseful adjustment
guardrail.detection_strategySet the global default to regex_only, regex_judge, or judge_first.
guardrail.detection_strategy_promptUse regex_judge or judge_first when prompt intent matters most.
guardrail.detection_strategy_completionDefault is regex_only; keep it there when streaming latency matters.
guardrail.detection_strategy_tool_callUse a judge-backed mode if tool-call arguments need semantic review.
guardrail.judge_sweepTurn off only when no-signal judge cost is more important than recall.

Rule and suppression tuning

NeedChange
A known false positive in judge PII outputAdd a targeted finding_suppressions entry.
Metadata should never reach the judgeAdd a narrow pre_judge_strips entry.
A tool result is noisy below a volume thresholdAdjust min_entities_for_alert in sensitive-tools.yaml.
A regex rule is too broadTighten its pattern, lower its severity, or remove it from the selected rule pack.
A whole pack should changePoint guardrail.rule_pack_dir at a different complete rule-pack directory.

Policy data knobs

policies/rego/guardrail.rego reads data.guardrail:

Data keyDefault in policies/rego/data.jsonEffect
severity_rankNONE=0, LOW=1, MEDIUM=2, HIGH=3, CRITICAL=4Converts scanner severity strings into comparable ranks.
block_threshold3Rank at or above this blocks in action mode.
alert_threshold2Rank at or above this alerts when not blocking.
cisco_trust_levelfullControls whether Cisco AI Defense findings are authoritative, advisory, or ignored.

Related