Presets and packs
See what a fresh DefenseClaw install ships: three admission presets and three rule packs named permissive, default and strict, and how to inspect them.
Two separate things ship in three matching names (permissive, default, strict). Change them separately.
| Layer | What it decides | Lives in | Switch with |
|---|---|---|---|
| Admission preset | What happens to a skill, MCP server or plugin at install, by scan severity, plus the guardrail block and alert levels | policies/<name>.yaml | defenseclaw policy activate <name> |
| Rule pack | The rules, judge prompts and suppressions that check prompts, replies and tool calls | policies/guardrail/<name>/ | defenseclaw guardrail use-pack <name> |
policy activate strict does not change guardrail.rule_pack, and use-pack does not change admission. For strict everywhere, run both.
Admission presets
The keys below are preset-file keys. In config.yaml the same values live under admission.defaults.actions, admission.<type>.actions, guardrail.block_at and guardrail.alert_at (Admission).
| Knob | permissive | default | strict |
|---|---|---|---|
admission.allow_list_bypass_scan | true | true | false |
skill_actions.critical | quarantine + disable + block | quarantine + disable + block | quarantine + disable + block |
skill_actions.high | none + enable + none | quarantine + disable + block | quarantine + disable + block |
skill_actions.medium | none + enable + none | none + enable + none | quarantine + disable + block |
scanner_overrides.mcp | none | HIGH, MEDIUM and LOW install and run (CRITICAL follows skill_actions.critical) | MEDIUM blocks and quarantines; LOW disables at runtime |
scanner_overrides.plugin | none | HIGH blocks and quarantines; MEDIUM installs and runs | HIGH blocks and quarantines; MEDIUM installs and runs |
guardrail.block_threshold | 4 (CRITICAL) | 4 (CRITICAL) | 2 (MEDIUM) |
guardrail.alert_threshold | 3 (HIGH) | 2 (MEDIUM) | 1 (LOW) |
guardrail.cisco_trust_level | advisory | full | full |
watch.rescan_interval_min | 120 | 60 | 30 |
Threshold ranks: 1 = LOW, 2 = MEDIUM, 3 = HIGH, 4 = CRITICAL. Human approval is not part of a preset; turn it on with defenseclaw guardrail hilt.
Activate a preset
policy activate copies the preset into config.yaml in one validated write. The gateway never reads the preset file.
| In the preset file | In config.yaml |
|---|---|
admission.scan_on_install, allow_list_bypass_scan | admission.defaults.scan_on_install, allow_list_bypass_scan |
skill_actions | admission.defaults.actions and admission.skill.actions |
scanner_overrides.<type> | admission.<type>.actions |
first_party_allow_list | admission.<type>.first_party_allow_list |
guardrail.block_threshold, alert_threshold | guardrail.block_at, alert_at, only where the preset's level differs from the selected rule pack's default |
guardrail.cisco_trust_level | guardrail.cisco_trust_level (unset for full) |
watch | watch.rescan_enabled, watch.rescan_interval_min |
cisco_ai_defense.endpoint, api_key_env | The same keys, when the preset carries them |
webhooks | Added to webhooks; an existing webhook is never removed or rewritten |
- The preset's
hilt,patterns,severity_mappings,firewall,enforcementandauditsections are not copied. - Activation replaces the whole
admission:section, so re-apply hand-tuned entries afterwards, or usedefenseclaw policy edit. - It prints each level it changes and warns when the new level blocks or alerts on fewer severities.
- The running gateway applies it without a restart, except for keys read at start (a listener,
guardrail.enabled,guardrail.scanner_mode).
defenseclaw policy list
defenseclaw policy show strict
defenseclaw policy create my-policy -d "Production policy"
defenseclaw policy activate my-policy
defenseclaw policy delete my-policy
defenseclaw policy validate
defenseclaw policy test --verbose
defenseclaw policy edit actions --severity high --runtime disable --policy-name my-policyAvailable policies:
* default [built-in] [active]
Balanced security policy for standard deployments
permissive [built-in]
Permissive policy for development and testing
strict [built-in]
Maximum security policy for high-risk environments
Activate a policy: defenseclaw policy activate <name>
Show details: defenseclaw policy show <name>* and [active] mark the active preset. Without --policy-name, policy edit changes the live policy in config.yaml; with it, it saves a named preset (your copy of a built-in goes to ~/.defenseclaw/policies/<name>.yaml, and policy delete restores the built-in). policy validate checks the policy files and compiles the Rego modules, and policy test runs the Rego unit tests; defenseclaw config validate checks config.yaml.
Block risky plugins at install
The default preset installs a plugin with a MEDIUM finding and lets it run. To block and quarantine those plugins:
defenseclaw policy edit scanner --type plugin --severity medium \
--install block --file quarantine --runtime disableThis writes admission.plugin.actions.medium. Read it back with defenseclaw config get admission.plugin.actions. Activating a preset again replaces the whole admission section, so make this change after the last policy activate.
Rule packs
| Pack | Rules on | Block and alert levels | Judge prompts | suppressions.yaml |
|---|---|---|---|---|
permissive | 279 of 287 | Block CRITICAL, alert HIGH and up | pii and tool-injection with higher thresholds; injection follows guardrail.judge.injection | 12 entries, including all IP findings and some file-inspection PII |
default | 283 of 287 | Block CRITICAL, alert MEDIUM and up | injection, pii, tool-injection | 9 entries: private and loopback IPs, platform IDs, system metadata |
strict | 299 of 299 | Block MEDIUM and up, alert LOW and up | The same three, lower thresholds | 4 entries; no tool suppressions |
All three have the same rule files, the same local-patterns.yaml and the same six sensitive tools. Switching packs does not turn the LLM judge on (guardrail.judge.enabled, default false). On Windows, strict keeps blocking .example, .bak and .template copies of credential files, like the files themselves; default and permissive do not block them. Pack differences rule by rule are on Deterministic detection; the levels and their scopes on Block and alert levels.
Other defaults
| Key | Default | Notes |
|---|---|---|
guardrail.mode | observe | Records, enforces nothing (Set up and modes) |
guardrail.hook_fail_mode | unset | A per-user install with no saved mode follows its rule pack when the gateway is down. Managed: closed (Set up and modes) |
guardrail.judge.enabled | false | Turn on with --judge-model or the setup prompt |
guardrail.hilt.enabled | false | min_severity is HIGH; the key is spelled hilt |
guardrail.judge.hook_timeout | 8s | One judge round trip on a hook |
guardrail.judge.timeout | 30s | One judge call on the proxy lane only (OpenClaw, ZeptoClaw) |
guardrail.judge.adjudication_timeout | 5s | The judge's review of what the rules flagged |
guardrail.detection_strategy | regex_judge | Rules first, then the judge. Runs as regex_only while the judge is off |
observability.local SQLite history | always on | Local history of collected logs |
defenseclaw setup guardrail --rule-pack default saves the pack name, not a path, and leaves block_at and alert_at unset, so the pack's levels apply. If config.yaml already has an entry for the connector under guardrail.connectors (defenseclaw setup claude-code or an init that picked several agents writes one), the command saves mode and rule_pack in that entry instead of at the top level. The setup summary and defenseclaw guardrail status show the values the connector runs with; defenseclaw config show --section guardrail shows where they are saved. Per-connector settings are on Several agents.
Inspect the active defaults
defenseclaw config show --section guardrail
defenseclaw config get guardrail.block_at --effective
defenseclaw policy show default
defenseclaw guardrail list-packsconfig show option | Shows |
|---|---|
--section NAME | One top-level section, such as guardrail or asset_policy |
--source | config.yaml as written, with no defaults filled in |
--effective | Only the observability section, resolved with its defaults |
--provenance | With --effective, where each observability setting comes from |
--format yaml|json | The output format (default yaml) |
config get KEY prints one dotted key; a default prints with a note on stderr. It exits 1 when the key has no value and no default, 2 for an unknown section. With --effective, the level keys, admission[.<type>] and guardrail.cisco_trust_level print the enforced value and its source: (source: pack-default:default) means the rule pack decides, (source: builtin) a shipped default, config:<key> a value you set. defenseclaw-gateway policy show prints what the gateway compiled, and defenseclaw-gateway policy evaluate dry-runs an asset against it.
Reset to defaults
There is no --reset flag. To go back to the defaults:
defenseclaw setup guardrail --rule-pack default --no-human-approval
defenseclaw guardrail hilt off --yes
defenseclaw policy activate default--no-human-approval without --connector turns off only the global guardrail.hilt; guardrail hilt off --yes turns it off for every active connector.
To reset all user state, copy ~/.defenseclaw first (reset keeps no archive), then run defenseclaw reset and defenseclaw quickstart --connector <name>. With several agents installed, bare quickstart exits with "Multiple connectors detected" and asks for --connector. On Windows copy %USERPROFILE%\.defenseclaw with Copy-Item -Recurse. A managed install resets through its lifecycle commands.
Block and alert levels
Set the guardrail block_at and alert_at levels: where to set them, which scope wins, what the rule pack supplies by default, and how to change them.
User and group profiles
Give a directory group, user, connector or agent its own guardrail settings with profiles, see which profile a person gets and read the audit record.