Policy fields
A policy is a Lua file that returns a table, and each field below is a key of that table. To write one, start from Write your own rules; for ready-made ones, see Recipes.
Your rules act in Normal and Enforce. Profile, where the command line starts, only reports what they would do, except where a field says otherwise. A field name Isonapse does not know is refused when the policy loads; names inside a field, such as tool:Bash:rm, are not checked that way, so try each rule before you make it active. A few more fields are settings for the Community Edition server, and this page does not cover them.
policy_version
A label you choose for this version of your policy, such as a date or a Git revision. Every decision record carries it, so you can tell which policy was in force.
Example: Start from the smallest policy
blocked_capabilities
Refuses every action of a kind, such as any sudo command, for the agents you name; * names every agent. Only an action rule that names that exact action, such as tool:Bash:sudo, can allow it again.
- A kind of action is matched by its name:
tool:Writedoes not cover Claude Code's MultiEdit or NotebookEdit.
Example: Block whole kinds of action
actions
Your decision for one kind of action, such as tool:Bash:rm: refuse it, ask first or allow it. In Enforce you can also let it pass only when it matches work you approved before.
decisionDENYrefuses,DEFERasks andPERMITallows.LEARNEDlets the action pass in Enforce only when it matches work you approved before; in Normal it allows the action.reason- Your message, shown when the rule refuses or asks.
defer_unless_local_bin- With
DEFERonnpx,bunxornpm exec: no question when the program is already installed in the project. trustlocalfor a tool that runs on this machine: personal data Isonapse masked is restored before the tool runs.external(the default) for one that runs elsewhere: the data stays masked.pii_allowlist- Patterns of personal data this tool may receive as written.
secret_allowlist- Kinds of detected data, such as
email, this tool may receive as written. allowed_secrets- Names of stored secrets this command may receive through a
{{ secret.NAME }}placeholder. domains- Limits an allow rule to these hosts; any other host is refused.
- A rule that names the exact action decides it: blocked actions, allowed-site lists, size and rate limits no longer apply to it, and
check_actiondoes not run for an ask orLEARNEDrule. Blocked sites and file and folder rules still apply. A rule on a broader kind, such astool:Bash, keeps them all. - An allow rule also lets that command's destructive uses through in Enforce, such as
git reset --hardunder an allow rule forgit. - A rule on
tool:Writedecides the Write tool only: a file an agent writes from a shell command is decided as that command,tool:Bash:<program>. To refuse writes to a file from every file tool and from the shell writes Isonapse reads, useblocked_file_patterns. - On Codex and Hermes Agent an ask is a refusal.
blocked_file_patterns
Refuses reads or writes of the files and folders that match, however the agent spells the path. A rule under tool:Read covers file reads; one under tool:Write or tool:Edit covers every file write, including the ones Isonapse reads in a shell command.
- A folder needs its trailing
/:company-secrets/is a folder,company-secretsa file name. *may appear only at the start or the end of a file name. A pattern of another shape never matches, and checking the policy names it.- A matching pattern refuses the action even when an action rule allows the tool.
- Pi's
grep,findandlssearch roots followtool:Readfolder rules, including relative paths and symlinks;grepandfindpath globs are checked too. Normal and Enforce refuse a covered or uncheckable read; Profile reports what it would refuse. - It checks the files a command visibly names; it is not operating-system confinement.
Example: Keep agents out of folders
allowed_domains
Once you list sites for a kind of action, refuses that action for every site not on the list.
- The example site rules name Claude Code's
WebFetch. To cover Hermes Agent'sweb_extract, add separate site rules fortool:web_extract;WebFetchrules do not carry over. Hermesweb_extracttakes one valid HTTP(S) URL per call. A batch, even for one site, or an empty or uninspectable URL list is refused in Normal and Enforce; Profile reports what it would refuse. Send one URL per call. Atool:WebFetchblocked-site rule can also refuse a blocked host visibly named by shellcurl; its allowed-site list does not limit shell commands. These checks do not confine network traffic. - Blocked beats allowed: a block-everything list next to it leaves no site.
- An action rule that names the exact action decides that action itself, so this field no longer applies to it.
Example: Choose the sites an agent may fetch
blocked_domains
Refuses web fetches to the sites you list, such as *.internal.example.com. Blocked beats allowed.
- The example site rules name Claude Code's
WebFetch. To cover Hermes Agent'sweb_extract, add separate site rules fortool:web_extract;WebFetchrules do not carry over. Hermesweb_extracttakes one valid HTTP(S) URL per call. A batch, even for one site, or an empty or uninspectable URL list is refused in Normal and Enforce; Profile reports what it would refuse. Send one URL per call. Atool:WebFetchblocked-site rule can also refuse a blocked host visibly named by shellcurl; its allowed-site list does not limit shell commands. These checks do not confine network traffic. - It refuses a listed site even under a rule that names the exact action: an allow rule, with or without its own
domains, an ask rule or aLEARNEDrule.
Example: Choose the sites an agent may fetch
rate_limits
Caps how many actions of a kind an agent may take. A limit on a broad kind, such as tool:Bash, counts the actions under it together.
per_minute- The most actions in a minute. Required.
per_hour- The most actions in an hour.
per_day- The most actions in a day.
- Counts are kept in memory for each agent session. A new session, a restart or a policy change starts every count again.
- An action rule that names the exact action decides that action itself, so this field no longer applies to it.
Example: Limit how fast an agent can act
max_payload_size
Refuses an action whose request is larger than the number of bytes you set. The size counts the whole request the agent sends, not only a file's content.
- An action rule that names the exact action decides that action itself, so this field no longer applies to it.
Example: Protect files by pattern
injection_warning_suppressions
Quiets one prompt-injection warning you have reviewed, for one kind of action and that exact content only.
- It never weakens a refusal or an ask, and changed content warns again.
llm
Settings for model calls, such as the models allowed and a budget.
- It does not limit what a coding agent spends on its own model: the coding agents these pages set up do not send their model calls through Isonapse.
Example: Branch on the environment
coherence
Expected values for measures such as calls per minute for a kind of action. An entry with hard_cap = true refuses an action that would go past its value, in every mode, Profile included.
Example: Drive several fields from one table
custom_rules
Accepted so older policies still load. It changes no decision: use check_action instead.
Stuck? Help finds the message you see.