Policy presets
Guard ships a small set of presets that decide what happens when it sees a risky action. A preset is a table of risk classes (secret reads, destructive shell commands, package installs, and so on) mapped to an action. You pick a level, and you can override single risk classes afterward.
Presets are local settings. They apply without signing in to Guard Cloud. Organization-managed settings can lock individual values on a device, and locked values are read-only locally.
ActionsDirect link to Actions
Every risk class resolves to one of six actions:
| Action | Dashboard label | Effect |
|---|---|---|
allow | Allow | The action runs. |
warn | Allow and record | The action runs and Guard records it. |
review | Ask once | Guard asks before the action runs. |
require-reapproval | Ask every time | Guard asks before the action runs, and asks again when the artifact changes. |
sandbox-required | Run in sandbox | The action may only run inside a contained sandbox. |
block | Stop | The action is denied. |
In the level tables below, "asks" means require-reapproval.
Security levelsDirect link to Security levels
Set a level with hol-guard settings set security-level <level> or the equivalent hol-guard settings set preset <level>. The default is balanced.
| Level | Behavior |
|---|---|
relaxed | Warns on secret reads, exfiltration, destructive shell commands, encoded execution, prompt injection, dangerous MCP tools, malicious skills, package scripts, and persistence. Allows network egress and package installs. Still warns, not blocks, on Guard bypass attempts. |
gentle | Same table as relaxed. The local dashboard treats gentle as relaxed. |
balanced | Default. Asks before secret reads, credential or data exfiltration, destructive shell commands, encoded execution, prompt injection, dangerous MCP tools, malicious skills, persistence, and low-trust artifacts. Warns on network egress, package scripts, and advisories. Blocks attempts to bypass Guard. |
strict | Everything in balanced, plus blocks data-flow exfiltration, prompt injection, dangerous MCP tools, malicious skills, persistence, encoded exfiltration, and unknown packages. Asks for network egress, package scripts, advisories, lockfile drift, and direct-source packages. |
paranoid | Blocks every risk class, including package installs and network egress. |
custom | Starts from the balanced table and lets you set each risk class yourself. |
Package-related risk classes (package_unknown, package_lockfile_drift, package_direct_source, package_custom_registry, package_install) allow by default at balanced. Guard pauses a package install when it finds evidence of risk, not just because a package is new. See Supply chain and package advisories for how that evidence is gathered.
Protection posturesDirect link to Protection postures
The dashboard and the quick settings use three postures instead of level names:
| Posture | CLI value | What it does |
|---|---|---|
| Protected | protected | Default. Stops credential theft, destructive wipes, and Guard bypass. Asks once about new tools or first-time secret access, then remembers the answer. |
| Extra careful | extra-careful | Everything in Protected, and also asks the first time a project talks to a new network destination or installs a new tool. Maps to the strict level. |
| Watch | watch | Records what Guard would have stopped without stopping anything. Use it while debugging, not as a resting state. |
hol-guard settings set protection extra-careful
hol-guard settings set protection protected
Choosing a posture also sets the matching level (Protected sets balanced, Extra careful sets strict, Watch sets observe mode). When a posture is chosen explicitly, Guard uses the posture's own risk table, which differs slightly from the level tables above. For example, Protected asks about package scripts, allows network egress, and blocks encoded exfiltration.
Watch mode turns itself off after 24 hours by default and returns to Protected. The dashboard has an Auto-revert Watch toggle under Protection rules, in Advanced fallback behavior, if you want to disable that.
To change one app only, add --harness:
hol-guard settings set protection watch --harness codex
hol-guard settings set protection --harness codex --inherit
--inherit clears the per-app choice so that app follows the machine-wide posture again. A per-app Extra careful override only ever makes Guard stricter than the base setting.
Change a single risk classDirect link to Change a single risk class
Use settings set risk to override one class. Class names use underscores or hyphens.
hol-guard settings set risk network_egress block
hol-guard settings set risk package-script require-reapproval --harness codex
Risk-class keys:
local_secret_read,credential_exfiltration,data_flow_exfiltration,encoded_exfiltrationdestructive_shell,encoded_execution,persistence,guard_bypassnetwork_egress,prompt_injection,mcp_dangerous_tool,malicious_skillpackage_script,package_install,package_unknown,package_lockfile_drift,package_direct_source,package_custom_registrycloud_advisory,low_trust_artifact
Guard resolves a risk class in this order: a per-app override, then a machine-wide override, then the table for the current posture or level.
Simpler switchesDirect link to Simpler switches
hol-guard settings set also has shortcuts for common choices:
| Command | Choices |
|---|---|
secret-files <action> | ask, warn, allow |
network <action> | warn, ask, block |
mcp <policy> | allow-known, ask-new, ask-dangerous, ask-all |
skills <policy> | allow-known, ask-new, ask-dangerous, ask-all |
packages <policy> | warn, ask-lifecycle, ask-all |
encoded-payloads <action> | warn, ask, block |
output-scanning <policy> | off, warn, ask |
Inspect the result with hol-guard settings list (saved values), hol-guard settings explain (plain-language summary), and hol-guard settings doctor (checks for common problems). Add --json to any of them for scripts.
In the local dashboardDirect link to In the local dashboard
Open Settings, then Protection, to pick Protected, Extra careful, or Watch. The Apps tab sets a posture per app. The Protection rules tab lists each risky action type with its action. Those rows follow the selected posture and become editable only after you switch to Custom.
The same tab has an Advanced fallback section for actions that match no remembered rule and no specific risk class. The defaults are:
| Setting | Default |
|---|---|
First-time action (default_action) | warn |
Unknown source (unknown_publisher_action) | review |
Changed command (changed_hash_action) | require-reapproval |
New website or host (new_network_domain_action) | warn |
Nested commands (subprocess_action) | warn |
Beyond presetsDirect link to Beyond presets
Presets set risk-class defaults. For allow and block rules that match specific commands, packages, or paths, with tests and a review step, write a policy file. See Policy as code.