Policy · critical
No recursive delete of system directories
Block recursive rm into protected system paths (/etc, /bin, /lib, /boot, /System, /Library, ...). Mirrors the write-scope policy for exec/rm. NOTE: /usr and /var are intentionally NOT listed — /usr/local and /var/tmp see legitimate use. Add them only if your environment warrants, and extend the fixture if you do.
The policy
A few lines of YAML in your repository.
Part of Claude Code safety. Assign the pack, or copy this policy into a manifest of your own.
- Verdict
- Critical: the step is blocked before it runs, and an incident is opened.
- Checked
- Before every step, against everything the agent did earlier in the task.
- Rule
- not
- name: "No recursive delete of system directories" description: | Block recursive rm into protected system paths (/etc, /bin, /lib, /boot, /System, /Library, ...). Mirrors the write-scope policy for exec/rm. NOTE: /usr and /var are intentionally NOT listed — /usr/local and /var/tmp see legitimate use. Add them only if your environment warrants, and extend the fixture if you do. rule_type: not params: condition: rule_type: field_matches_regex params: field: properties.command pattern: "^(?:.*[;&|]\\s*)?(?:(?:sudo|doas|env|xargs|time|nice)\\s+)?rm\\s+(?:-\\S+\\s+)*-\\S*[rR]\\S*\\s+(?:-\\S+\\s+)*/(?:etc|bin|sbin|lib|lib64|boot|sys|proc|dev|System|Library)(?:/|\\s|$)" severity: critical enforcement_point: step_executionHow the rule works
not: Compound rule: passes if and only if the sub-condition fails.
condition:{"rule_type":"field_matches_regex","params":{"field":"properties.command","pattern":"^(?:.*[;&|]\\s*)?(?:(?:sudo|doas|env|xargs|time|nice)\\s+)?rm\\s+(?:-\\S+\\s+)*-\\S*[rR]\\S*\\s+(?:-\\S+\\s+)*/(?:etc|bin|sbin|lib|lib64|boot|sys|proc|dev|System|Library)(?:/|\\s|$)"}}. A single sub-condition (dict with rule_type and params).
In these packs
- Claude Code safety, version 1.0.5
From Kyvvu's open policy library at github.com/Kyvvu/manifests, Apache 2.0.
Next
Watch it decide.
In your browser
Try it in the playground
The policy is loaded. Add the steps your agent takes and watch the engine decide, step by step.
On your machine
Five minutes, no account
kyvvu try runs a demo agent against the bundled baseline. Then assign this pack from the dashboard or the CLI.
For security teams
See it on your agents
A 30-minute demo on the agents you actually run, with the policies that fit them.