Protect Isonapse itself and ask before download-and-run
Blocks writes and edits to Isonapse's own program and settings files, and asks before a launcher downloads and runs a package, such as npx or uvx. It adds no rules for your own work.
Works with: All four agents. On Codex and Hermes Agent an ask is a refusal. Supported hosts has the detail for each agent.
Steps
1. Apply it
isonapse hook policy apply hardenedIt asks for the password you log in to this computer with and replaces your whole policy. The old one is backed up first, and the command prints where.
2. Ask what each mode would do
isonapse hook policy test --command "uvx ruff check"Nothing runs, and no record is written. It prints one line per mode, with the reason; here Normal and Enforce ask.
3. Undo it
isonapse hook policy revisionsisonapse hook policy rollback <revision>The first lists earlier policies; the second restores one, with one approval and the password you log in to this computer with. Use a plain terminal window that runs no agent, such as macOS Terminal or Ghostty.
What it does not do
- The other starter policies already carry these lines;
folder-denycarries only the file lines. Applying a starter policy replaces your whole policy, so to combine two, copy the lines you want into one file and make it active. npx,bunxandnpm execdo not ask when they run a program already installed in the project.
The policy
The whole starter policy, exactly as isonapse hook policy apply hardened writes it.
-- hardened — minimum self-protection baseline.
--
-- Blocks writes/edits to Isonapse's own runtime files (hook binary,
-- controlplane binary, managed-settings). Asks before download-and-run
-- launchers. Pair it with another template for everyday workflow rules.
return {
blocked_file_patterns = {
["tool:Edit"] = {"**/isonapse*", "**/managed-settings*"},
["tool:Write"] = {"**/isonapse*", "**/managed-settings*"},
},
actions = {
["tool:Bash:bunx"] = {
decision = "DEFER",
reason = "Download-and-run launcher requires operator approval.",
defer_unless_local_bin = true,
},
["tool:Bash:npm:exec"] = {
decision = "DEFER",
reason = "Download-and-run launcher requires operator approval.",
defer_unless_local_bin = true,
},
["tool:Bash:npx"] = {
decision = "DEFER",
reason = "Download-and-run launcher requires operator approval.",
defer_unless_local_bin = true,
},
["tool:Bash:pipx:run"] = {
decision = "DEFER",
reason = "Download-and-run launcher requires operator approval.",
},
["tool:Bash:pnpm:dlx"] = {
decision = "DEFER",
reason = "Download-and-run launcher requires operator approval.",
},
["tool:Bash:uv:tool-run"] = {
decision = "DEFER",
reason = "Download-and-run launcher requires operator approval.",
},
["tool:Bash:uvx"] = {
decision = "DEFER",
reason = "Download-and-run launcher requires operator approval.",
},
["tool:Bash:yarn:dlx"] = {
decision = "DEFER",
reason = "Download-and-run launcher requires operator approval.",
},
},
}
Stuck? Help finds the message you see.