Deterministic detection reference
Reference for the shipped detectors, what may block and what only alerts, the per-rule action details, chains, YARA signatures, protection packs and rule files.
DefenseClaw separates detection from blocking authority. A regex, CEL expression, YARA signature or correlated sequence can create a finding. A tool call is denied only when a complete proof for the same rule reaches a connector that can block, and the levels map the finding's severity to block.
The shipped detectors are:
| Detector | Count | Can block |
|---|---|---|
Local rules, default pack | 283 on | Only with a proof for the same rule |
| Exact semantic proofs | 34 rules | Yes |
| Fixed tool-call chains | 26 | Some (chains) |
| YARA signatures for MCP tool descriptions | 11 | No, alert only |
| Session correlator patterns | 2 | No, recorded after the fact |
| Opt-in protection packs | 6 | Yes, with a proof |
The balanced/default enabled rule catalog contains 283 local rules across seven families; the families are on Deterministic rules. How well the detectors do is on Benchmarks.
Decision architecture
List view for small screens. Use the expand button to open the drawing.
- Parse the tool callinto ActionFacts
- factsRules flag candidates
- Rules flag candidatesCEL and RE2 regex
- candidateCode checks the effect
- Code checks the effectproof for the same rule ID
- single callProven, and can block?
- chain ruleFixed chains check
- Fixed chains checkearlier steps in the session
- chain completeProven, and can block?
- Proven, and can block?connector blocks before run
- noRecorded, not blocked
- yesLevels pick the action
- Levels pick the actionby severityallowalertconfirmblock
- Recorded, not blockeddetection-only or alert-only
Text version of this diagram
- Parse the tool call: into ActionFacts (policy layer)
- facts to Rules flag candidates
- Rules flag candidates: CEL and RE2 regex (policy layer)
- candidate to Code checks the effect
- Code checks the effect: proof for the same rule ID (policy layer). Only DefenseClaw's own code can supply this proof. A rule pack cannot grant it to itself.
- single call to Proven, and can block?
- chain rule to Fixed chains check
- Fixed chains check: earlier steps in the session (policy layer). Only earlier steps that finished successfully count.
- chain complete to Proven, and can block?
- Proven, and can block?: connector blocks before run (decision)
- no to Recorded, not blocked
- yes to Levels pick the action
- Levels pick the action: by severity, allow, alert, confirm, block (policy layer)
- Recorded, not blocked: detection-only or alert-only (component)
Current rule inventory
| Profile | Declared rules | Enabled rules | CEL declarations | Tool-call-only | Never-match a^ fallbacks |
|---|---|---|---|---|---|
| Balanced/default | 287 | 283 | 137 | 152 | 89 |
| Permissive | 287 | 279 | 137 | 152 | 91 |
| Strict | 299 | 299 | 150 | 170 | 91 |
- CEL declarations are rules with an
expression. A few are the literalfalse: the rule stays lexical in that pack, or only its code proof can match it (CMD-WRAPPED-DOWNLOAD-EXEC,CMD-SUBST-DOWNLOAD-EXEC). a^is an impossible RE2 pattern. It is used where a raw text fallback would add noise or could not prove the same effect.permissivealso keepsCMD-PIPE-CURLandCMD-PIPE-WGEToff.
How facts, CEL and regex fit
| Piece | What it does | Limit |
|---|---|---|
| ActionFacts | Parses POSIX shell, PowerShell, cmd.exe, argv calls and known tool schemas into typed facts. Dynamic, conditional, cut-off or ambiguous input records a parse status and cannot block. | 64 KiB per command input; at most 128 command, 256 path, 128 network and 256 data-flow facts |
| Enforcement view | A second view of the facts keeps only effects proven to run. Previews, unresolved branches and incomplete argv can alert but never block. | — |
| CEL | Boolean logic over the facts. A match is a candidate; a proof in code for the same rule ID decides. | Syntax and cost limits on CEL engine |
| Regex | Finds secrets, injection, C2 hosts and personal data in text; picks candidates for a code proof; keeps detection when facts are incomplete. A raw or custom regex match on a tool call is never blocking proof. | Go RE2 |
Some proofs need identities (a database connection, a Kubernetes object, a cloud principal, a staged file path). DefenseClaw keeps only operation classes and SHA-256 digests of those identities; raw SQL, commands, passwords and payload bytes are dropped before they reach chain state. The CEL fields are listed on Custom rules with CEL.
Exact atomic semantic rules
Thirty-four rule IDs use exact semantic proofs. Neither the CEL nor the regex selector alone can authorize a block. They reject near-miss programs, help and version calls, dynamic operands, previews, conditional commands, unresolved paths and incomplete arguments.
| Security effect | Exact rule IDs |
|---|---|
| Execution | exec.remote_ip_download_execute_same_artifact, exec.postgresql_copy_program, exec.sql_command_udf_create |
| Persistence | persistence.global_ld_preload_install, persistence.windows_accessibility_feature_hijack |
| Privilege | privilege.cloud_iam_administrator_attachment, privilege.kubernetes_cronjob_privileged_patch, privilege.sudoers_unrestricted_nopasswd, privilege.windows_uac_autoelevation_hijack |
| Credential access | credential.macos_fake_update_prompt, credential.macos_login_keychain_dump, credential.pam_password_capture, credential.windows_lsass_memory_dump, credential.windows_registry_hive_dump |
| Impact | impact.linux_magic_sysrq_destruction, impact.posix_host_halt, impact.windows_delete_all_shadow_copies, impact.windows_recovery_disable_pair, impact.windows_recovery_store_destruction |
| Security-control tampering | tamper.cloud_audit_control_destruction, tamper.complete_firewall_relaxation, tamper.endpoint_security_product_disable, tamper.linux_security_control_disable, tamper.macos_unified_log_erase, tamper.posix_logging_hardening_disable, tamper.posix_system_log_destruction, tamper.windows_amsi_disable, tamper.windows_audit_policy_wipe, tamper.windows_credential_protection_weaken, tamper.windows_defender_component_disable, tamper.windows_defender_multi_control_disable, tamper.windows_registry_security_control_disable, tamper.windows_telemetry_disable, tamper.windows_usn_journal_delete |
Action-mode rule details
How specific rules act, by pack. Observe mode records every one of them and blocks none, except the self-protection rule (Set up and modes).
Prompt-injection floor
A small structural floor for text that reaches the model as user content (a prompt, a tool result). Each rule claims one structure that ordinary prompts do not have.
| Rule | Structure | Default | Strict |
|---|---|---|---|
TRUST-ADDRESSED-DEFER | A message addressed to the assistant that defers the user's own task | alert (HIGH) | block |
TRUST-FAKE-ROLE-HEADER | A line that starts as a system or assistant header | alert (HIGH) | block |
TRUST-HIDDEN-TAGS | Eight or more Unicode tag characters in a row | alert (HIGH) | block |
TRUST-HIDDEN-INVISIBLE | Sixteen or more zero-width or format characters in a row | alert (HIGH) | block |
TRUST-HIDDEN-BIDI | A bidirectional override or isolate control that is closed again | alert (MEDIUM) | block |
TRUST-IGNORE-INSTEAD | An override of earlier instructions that names a replacement task | alert (HIGH) | block |
TRUST-TODO-DATA-MOVE | A message that opens with TODO: or FIXME: and tells the assistant to send or share something | alert (HIGH) | block |
TRUST-TODO-DIRECTIVE | A message that opens with a task-list marker and tells the assistant to delete, change, visit, book or create something | alert (MEDIUM) | block |
TRUST-IGNORE-PREVIOUS and TRUST-DISREGARD are CRITICAL and block in every pack. The trust rules also run on a folded view of the text (invisible separators removed, look-alike letters mapped). With the judge on and detection_strategy: regex_judge, a prompt with half of one of these shapes goes to the judge; without a judge it does nothing.
Credential literals in a tool call
| The call | Result |
|---|---|
| Writes the literal into a file, a memory entity, a database row or a message | Alert, never a block. A provider key alerts in every pack; SEC-SECRET-ASSIGN alerts in default and strict |
Uses it without writing it down (an export before a build, a connection string) | Audit record (LOW, no alert) |
| Sends it to an external host, or writes it to a sensitive path | Enforceable |
Only reads it (grep, cat, Read, a read-only MCP tool) | Audit record (LOW, no alert) |
Writes it into test code or sample data (tests, fixtures, testdata, x_test.go, conftest.py and similar) | Audit record |
SEC-SECRET-ASSIGN finds credentials with no provider prefix: a credential-named key (password, token, api_key, DB_PASSWORD, dbPassword) followed by :, =, , or is and a 12 to 128 character value that mixes letters and digits and passes an entropy floor. Placeholders (changeme, YOUR_API_KEY_HERE), variable references, paths and setting names (max_tokens) are not findings. It is MEDIUM.
Download piped into a shell
| Pack | Severity | Action mode |
|---|---|---|
default | HIGH | Alert; allow |
permissive | HIGH (off) | Allow; no finding |
strict | CRITICAL | Alert; allow |
The finding needs a parsed flow from a download's output into an interpreter, and it never blocks. strict also reports PowerShell web cmdlets piped to iex under CMD-PIPE-CURL. A download through a privilege wrapper, or used as a command substitution, has its own exact proof.
A PowerShell download piped to iex is reported (CMD-WIN-IWR-IEX) when PowerShell runs it: a PowerShell command on Windows, or pwsh -Command "..." or powershell -Command "..." on any OS, with or without -NoProfile. Typed into bash or sh on Linux or macOS, iwr and iex are not commands, so there is no finding for them. To turn these alerts off, use the permissive pack or a suppression.
Staged files and inline code
Five rules report effects a coding agent rarely produces. They come from a proof over the parsed commands and never block, in any pack.
| Rule | Reports |
|---|---|
exec.escaped_binary_write | echo or printf escapes that decode to binary bytes written to a file, when it looks like staging a program (an executable header, an append, or the file is then made executable or run) |
account.literal_password_change_via_stdin | passwd fed by echo or printf, or passwd or chpasswd piped into a shell |
exec.download_then_run_fetched_file | A file fetched from a bare public IPv4 address that a later command of the same call runs |
source_control.clone_then_run_or_adhoc_push | Running a file of a fresh clone, or a git push to an inline remote that is not a known code forge |
exec.inline_code_network_and_exec | An interpreter one-liner that asks for both network and process-spawn capabilities, or a runner told to run a URL |
Protected SSH keys
Writes to the active user's authorized_keys are blocked in action mode when a direct command, a file tool or a supported literal interpreter form proves the target; in observe mode the same write raises a CRITICAL would-block alert and runs.
- Reads allowed:
cat,head,tail,less,ls,stat,grep,wc,ssh-keygen -l, and on Windowstype,findstrandSelect-String. - Blocked as a write: a redirect, a pipe into a command that writes, an in-place flag,
ssh-keygen -R,tee, or the file as a copy source. - Unknown, not a write: the file named only as an operand of a program DefenseClaw has no model of, or a write whose target cannot be resolved. Per-user
defaultandpermissivealert;strictand every managed install block.
A read of a private key under ~/.ssh is blocked in action mode (PATH-SSH-KEY) whatever program prints it, including a stdin redirect, a recursive search of the folder and interpreter code that opens the key. .pub files, ~/.ssh/config and listings are not key reads. Normal key use (ssh-keygen -y, ssh-add, ssh -i, signed commits) is allowed. On managed Linux with Tetragon, the kernel can also refuse the open (Tetragon).
The rule reads the text of the command. A write by a program the command starts, through an existing link to the protected file, is not seen. Use the sandbox and file permissions for containment.
Instruction files
A write to an instruction file (CLAUDE.md, AGENTS.md and similar) that the session loaded, or found at its start, is CRITICAL. In action mode the default and strict packs block it with no change to block_at. The permissive pack keeps it at HIGH and reports it.
- A file the session created is its own and is not blocked.
- A file known only by its name is a warning in
defaultandpermissive;strictblocks it.
So with the default pack, instruction-file writes are HIGH, so they are reported, not blocked, unless the session loaded the file or found it at its start, guardrail.block_at is HIGH or the strict pack is used.
DefenseClaw's own files
DefenseClaw also protects its saved installer (~/.defenseclaw/installer/ and ~/.defenseclaw/previous/installer/): every rule pack reports an agent that writes, truncates or deletes it (tamper.detector_state_write), like config.yaml. The strict pack blocks that change in every mode, on a managed host that uses it too; the default and permissive packs, a managed install's default pack included, raise a HIGH alert and do not block it. Reading or running the saved installer stays allowed.
Database rules
- Comments do not hide destructive SQL:
--,/* */, MySQL#and nested comments are removed first. A form whose meaning depends on the engine gives no fact. - Covered clients:
psql,mysql,mariadb,sqlcmdandsnowsql(inline-qor--query). A query file (-f) is not read. - A destructive statement raises the alert-only
impact.sql_destructive_mutation. Thedatabase-destruction-protectionpack can block.
Personal data rules
| Rule | Behavior |
|---|---|
| Card numbers | Count only digit runs that pass the Luhn check, have a real card prefix and length, and are not part of a longer token. Digits after a decimal point are skipped. |
ENT-EMAIL-BULK | One address: LOW in every pack. Alerts on an address in a URL on another host; skips local paths. |
PII-EMAIL-LIST | Five or more addresses within about 4 KB. MEDIUM: strict blocks, default alerts. |
PII-EMAIL-FIELD | An address in a labeled field. MEDIUM. |
| A card or passport number in a sent message | Never blocked: alert in default and strict, recorded in permissive. |
Email addresses are scored by how many there are: one is LOW, a list or a labeled field is MEDIUM. Commit trailers (Author:, Signed-off-by:) do not count toward a list. Contact rules run on prompts, replies and tool-call arguments, not on tool output (Tool results).
CodeGuard
CodeGuard is Preview on a managed computer. It scans PowerShell, batch, .bash, .zsh, .mjs, .cjs, .jsx and .tsx files as code on the hook path. CG-PATH-001 reads path operations; a relative import of a sibling module is not a finding.
Evaluation and operand limits
| Limit | What happens | default, permissive | strict |
|---|---|---|---|
| More than 128 commands in one shell call, or a reading bound such as deep nesting | ACTION-COMPOUND-LIMIT; the call proves no target | Alert, call runs; the judge decides where configured | Block in action mode |
| More than 1024 operands and redirect targets in one call | ACTION-COMPOUND-LIMIT with reason bounded_truncated cap=items | Alert, call runs | Block in action mode |
A body that exists only at run time (bash -c "$BODY") | ACTION-PARSE-FAILURE; the rest of the call is still judged | Alert, never blocks | Alert, never blocks |
| A PowerShell call read only in part | Its own finding | Alert | Block |
- A protected target the call does prove decides on its own in every pack. A protected file or link among the first 1024 operands, or named directly, is blocked in every pack.
- With
defaultandpermissive, a statement past the limit can hide a write to a protected file in the same call. Usestrictwhere that matters, or split the command, or run it from a script file. - PowerShell folder from an environment variable. After a PowerShell folder change through an environment variable (
Set-Location $env:X,pwsh -wd $env:X), DefenseClaw judges a following relative write by file name only: obvious credential file names alert (and block instrict). - The operand-limit finding is CRITICAL with an alert action. Its title carries
bounded_truncated cap=items; a redaction profile ofcontentorstrictremoves the title, leaving the rule ID and severity.
Bounded tool-call chains
The fixed chain catalog contains 26 ordered behaviors. A chain looks at the current call and at most eight earlier calls from the same connector session, within 30 minutes. Steps must be in order, succeed where required and be joined by an exact identity. Failed, denied, replayed, cross-session or changed sequences never complete a proof.
| Chain | Join | Result |
|---|---|---|
| Guardrails disabled → external egress | Same session, in order | Alert |
| Permission denied → runtime bypass | Same session, five minutes | Alert |
| Privilege discovery → elevation | Same session | Alert |
| Secret-manager read → external egress | Same session | Alert |
| Secret read → external egress | Exact artifact; a file write in between keeps the alert but not the strict block | Alert in default and permissive, block in strict |
| Workload identity read → lateral execution | Same workload identity | Alert |
| Download → decode → execute | Exact derived artifact | Alert |
| Download → execute | Exact artifact | Alert |
| Sensitive-egress artifact write → execute | Exact artifact | Alert |
| Firewall trust expansion → destination use | Exact IP | Alert |
SQL Server xp_cmdshell enable → invoke | Exact connection, successful last step | Alert |
| Privileged host-root manifest write → apply → pod exec | Exact manifest and pod | Alert |
| Wireless capture → deauthentication | Exact BSSID | Alert |
| Credential extraction → remote execution | Exact target and principal | Alert |
| Cloud IAM principal create → AdministratorAccess attach | Exact principal | Alert |
| Privileged CronJob patch → job creation | Exact CronJob | Alert |
| Command-capable SQL UDF create → invoke | Exact engine, connection and function | Alert |
| Reverse-shell payload write → persistence install | Exact path and payload grammar | Can block |
| Endpoint-security change request → completed process | Exact process | Alert |
| Sensitive read value → literal external transmission | Exact value identity | Alert |
| Sensitive SQL value → cross-resource persistence | Exact value, different destination | Alert |
| Compromised credential → successful authentication | Exact credential | Alert |
| AD CS certificate request → PFX authentication | Exact certificate | Can block |
| S4U ticket → Kerberos secrets dump | Exact ticket cache | Can block |
| Sensitive SQLite read → unbounded delete | Exact database and table | Can block |
| File read → email transfer | Exact artifact | Alert |
"Can block" still needs a connector that can block and levels that map the severity to block.
Download → execute
chain.download_then_execute_same_artifact alerts when an agent downloads a file with curl or wget and then runs that same file within eight calls and 30 minutes. It never blocks.
- Source. A public IP address, or a dotted host name outside local suffixes (
.local,.localhost,.internal,.lan,.home.arpa,.corp,.testand similar). No DNS lookup is made. - Your mirrors. Add your domains to
guardrail.internal_domains; downloads from them do not start the chain. - Downloads the user asked for. When the user's prompt in this turn or one of the two before names the host and asks to run or install, the download does not start the chain. A prompt can only silence this alert; it never allows a call.
- Codex. A Codex shell download does not start the chain: Codex reports a shell result with no exit status, so the download cannot be proven to have succeeded.
MCP and app tool calls
An MCP or app tool call is read as effects, the same kind of facts shell and file tools produce, and the rules decide on the effects.
| Effect | Read from | Rules |
|---|---|---|
| File read, write, delete or list | Path-valued arguments, absolute or home paths in other keys, and file: URIs; relative paths resolve against the session folder | The native file-tool rules (PATH-SSH-KEY, PATH-AWS-CREDS, PATH-KUBE and the rest), plus PATH-K8S-CLUSTER-CRED, PATH-CRED-STORE, PATH-CRED-STORE-USER |
| SQL statement | sql, statement, and query for a database tool | MCP-SQL-DESTRUCTIVE, MCP-SQL-PRIVILEGE, MCP-SQL-AUDIT-OFF, MCP-SQL-CREDENTIAL |
| Send to a recipient, copy or URL | to, recipients, url, bcc, forward_to, output_url, callback_url | MCP-SEND-REDIRECT (a hidden copy or callback to a host that is none of the call's own parties; always an alert), MCP-SEND-COLLECTOR (a paste, file-drop or webhook-catcher host) |
| Security setting | Values such as skip_2fa: true, verify_ssl: false, acl: public-read | MCP-SETTING-DOWNGRADE |
| Code | The code argument of a code-execution tool | MCP-CODE-DECODE-EXEC |
| Page script | The script of a browser-automation tool that runs JavaScript in the page | PAGE-SCRIPT-SESSION-EGRESS: page storage or cookies sent to a host other than the page's. An alert in every pack. |
- Known and guessed roles. For a few known tools (the filesystem server's
read_file,write_fileand similar) the verdict is the native file tool's, including a block. For other tools the role is a guess from names: outsidestricta finding is an alert, never a block. - Data is not arguments. Text a call writes or sends (a message body, an issue description) is data, not paths to judge.
- Bounds. 512 items per array, 16 levels, 256 effects, 1 MiB per string. A call that reaches a bound carries the evaluation-limit finding at least at the unknown tier.
- Shell rules without CEL.
CMD-SECRET-REVEAL,CMD-SECRET-LOOKUP,CMD-GIT-SHOW-SECRET,CMD-PRIV-SETUID,CMD-PRIV-PATH-HIJACKandCMD-PERSIST-SYSTEM-SCHEDULErun in code on the parsed facts. - Switch.
guardrail.cascade.lanes.nonshell(on, the default,shadoworoff, top level only) turns this whole lane on or off. Inshadowandoffit adds nothing.
YARA MCP-description scanning
The MCP scanner adds eleven MCP-description YARA signatures from policies/yara/mcp-tools/description_injection.yara. They are alert only.
| Signature | Requires |
|---|---|
| Addressed sensitive-data transfer | A send or share verb, a sensitive object and an addressed email-like sink |
| Concrete financial action | An account action, a literal amount and owned-account language |
| Exact destructive user-data action | A narrow delete or move of the user's data |
| Security-control downgrade | A request to turn off MFA on the user's account |
| Multi-attribute profile change | One request changing email, location and birthday together |
| Addressed edit-access grant | Edit permission granted to an addressed person |
| Sensitive health-data change | A genetic-data change or an addressed health-app share |
| Traffic-control override | An emergency-priority or signal override |
| Physical-access change | A smart-lock guest grant or a door unlock |
| Network-security policy change | An allowlist or business-service denylist change |
| Hidden credential exfiltration | A home credential-file path with an instruction to read and send it |
Protection packs and policy-provided context
Some actions are fine in general but forbidden inside a boundary you declare, such as a production cluster. A protection pack supplies that fact.
| Pack | Status | Covers |
|---|---|---|
privacy-high-assurance | Selectable | 14 structured PII rules: SSNs, cards, IBANs, labeled email and phone, email lists, medical IDs, dates of birth, CSV and JSON records |
cloud-production-protection | Selectable | Bulk cloud-data deletion, resource deletion, audit-control destruction |
database-destruction-protection | Selectable | DELETE without WHERE, table-wide destructive statements, SQLite read-then-delete |
infrastructure-destruction-protection | Selectable | Device wipe, access-control weakening, unscoped Terraform, OpenTofu or Pulumi destroy |
kubernetes-production-protection | Selectable | Named Secret reads, namespace deletion, delete --all on workloads |
active-directory-protection | Selectable | Kerberos ticket and AS-REP requests, NTDS export, NetExec credential use and spraying, bulk LDAP collection |
defenseclaw guardrail protection list
defenseclaw guardrail protection enable cloud-production-protection --connector codex
defenseclaw guardrail protection disable cloud-production-protection --connector codexenable adds the pack to guardrail.rules.protections for the scope (global, --connector X or --profile P). The gateway layers its rules on that scope's rule pack in memory, replacing rules with the same ID. A narrower scope cannot turn off a pack a wider scope enabled. Turning on a production pack asserts that the connector really works on that protected context.
A seventh contract, ssh-authorized-keys-protection, ships but cannot be turned on yet; protection enable refuses it.
Rule files
policies/guardrail/<pack>/
defenseclaw-pack.json # posture: default, strict or permissive
rules/
local-patterns.yaml # literal phrases and regexes for prompts and text
commands.yaml sensitive-paths.yaml c2.yaml cognitive.yaml
enterprise-data.yaml secrets.yaml trust-exploit.yaml
judge/
injection.yaml pii.yaml tool-injection.yaml
sensitive-tools.yaml
suppressions.yamlThe 283 enabled balanced/default rules are generated from policies/guardrail/default/rules/*.yaml; the families are listed on Deterministic rules. local-patterns.yaml holds pattern lists by family (injection, injection_regexes, secrets, pii_requests, pii_data_regexes, exfiltration). For each key:
| You write | Result |
|---|---|
| Nothing (key left out) | The built-in default for that family |
field: [...] | Your list replaces the default |
field: [] | The family is turned off |
Regexes compile during validation, and one invalid expression rejects the whole pack (Packs and rules).
Other detection lanes
Session correlator
The correlator reads saved findings of one session and records a CORR-* finding when a pattern of events adds up to something worse. It never changes the request that completed the pattern.
| Pattern | Window | Severity | Trigger |
|---|---|---|---|
LETHAL-TRIFECTA | 30 events | CRITICAL | Untrusted input, then sensitive access, then external egress, in order |
TRIFECTA-WITH-FINGERPRINT-MATCH | 30 events | CRITICAL | The same content fingerprint in a sensitive-access finding and a later egress finding |
- Both patterns are built in. A rule pack cannot add, change or turn them off.
- The finding is written only to the local audit database (
scan_findings, rule IDsCORR-%). It is not sent to Splunk, OTLP or webhooks. Query the database to act on it.
Suppressions and Rego
- Suppressions change only judge input and judge findings, never a regex or CEL finding. See Packs and rules.
- Built-in Rego decides admission (
defenseclaw.admission:verdict,reason) and maps guardrail findings to an action (defenseclaw.guardrail:action,severity,reason). It runs inside the gateway with input compiled fromconfig.yaml. If a query fails, admission denies and the guardrail falls back to the pack's levels. An upgrade replaces the shippedadmission.regoandguardrail.regoand saves an edited copy in~/.defenseclaw/backups/rego-<time>/; keep your own rules in a separate file inpolicies/rego. - Your own Rego policy for the final action is on Cascade and Rego.
- The LLM judge is on LLM judge.
Deterministic rules
What the local rules check, how a shell or PowerShell command is read, which families of rules ship, and what only alerts and what blocks.
Custom rules with CEL
Add your own guardrail rule to a copy of a rule pack with a CEL expression over a tool call's parsed facts and a regex fallback, then validate and test it.