Policy Cookbook
Policy Cookbook
Section titled “Policy Cookbook”This page provides example policies for common governance patterns. Use these as starting points and adapt them to your environment.
For policy condition reference, see Governance.
Safe Browser
Section titled “Safe Browser”Allow browser automation only when the target is constrained and network access is controlled.
Allow browser within path scope
Section titled “Allow browser within path scope”policy_id: allow_browser_scoped_pathsscope: tenant_id: t1subject: type: adapterconditions: tool: browser context: targets: paths: any_under: ["/allowed/projects/*"]effect: decision: allowexplanation: Allow browser automation when targets are under allowed project paths.precedence: 100Require approval for browser with external network
Section titled “Require approval for browser with external network”policy_id: require_approval_browser_external_networkscope: tenant_id: t1subject: type: adapterconditions: tool: browser context: external_network: trueeffect: decision: require_approvalexplanation: Browser with external network access requires human approval.precedence: 80Deny marketplace browser with elevated privileges
Section titled “Deny marketplace browser with elevated privileges”policy_id: deny_marketplace_browser_elevatedscope: tenant_id: t1subject: type: adapterconditions: tool: browser context: elevated_privileges: true provenance: source: marketplaceeffect: decision: denyexplanation: Deny marketplace skills from running browser with elevated privileges.precedence: 200Per-Agent Policies
Section titled “Per-Agent Policies”Scope policies to specific agents using agent_id or agent_role. Adapters include these in the execution request.
Allow only trusted agent for shell
Section titled “Allow only trusted agent for shell”policy_id: allow_trusted_agent_shellscope: tenant_id: t1subject: type: adapterconditions: agent_id: agent-prod-001 capability: shell.execeffect: decision: allowexplanation: Allow shell execution only from the designated production agent.precedence: 100Require approval for researcher role
Section titled “Require approval for researcher role”policy_id: require_approval_researcherscope: tenant_id: t1subject: type: adapterconditions: agent_role: researcher capability: browsereffect: decision: require_approvalexplanation: Researcher agents using browser require human approval.precedence: 80Controlled Execution
Section titled “Controlled Execution”Govern shell and runtime execution with path and command constraints.
Allow exec with argv0 allowlist
Section titled “Allow exec with argv0 allowlist”policy_id: allow_exec_argv0_allowlistscope: tenant_id: t1subject: type: adapterconditions: tool_group: runtime context: exec: argv0: in: ["node", "python", "npx"]effect: decision: allowexplanation: Allow execution when argv0 is in the approved list.precedence: 90Deny marketplace shell with network
Section titled “Deny marketplace shell with network”policy_id: deny_marketplace_shell_exec_with_networkscope: tenant_id: t1subject: type: adapterconditions: capability: shell.exec context: external_network: true provenance: source: marketplaceeffect: decision: denyexplanation: Deny marketplace skills that request shell execution with external network access.precedence: 200Require approval for high-risk exec
Section titled “Require approval for high-risk exec”policy_id: require_approval_high_risk_execscope: tenant_id: t1subject: type: adapterconditions: tool_group: runtime risk_level: higheffect: decision: require_approvalexplanation: High-risk runtime execution requires approval.precedence: 70Restricted Messaging
Section titled “Restricted Messaging”Control messaging and external communication tools.
Require approval for messaging tools
Section titled “Require approval for messaging tools”policy_id: require_approval_messagingscope: tenant_id: t1subject: type: adapterconditions: tool: in: ["message", "slack", "whatsapp_login", "discord"]effect: decision: require_approvalexplanation: Messaging tools require human approval before sending.precedence: 75Deny marketplace messaging
Section titled “Deny marketplace messaging”policy_id: deny_marketplace_messagingscope: tenant_id: t1subject: type: adapterconditions: tool: in: ["message", "slack", "whatsapp_login", "discord"] provenance: source: marketplaceeffect: decision: denyexplanation: Deny marketplace skills from using messaging tools.precedence: 200Fallback Rule (Extensible Adapters)
Section titled “Fallback Rule (Extensible Adapters)”For adapters like OpenClaw that can gain new tools via skills, add a low-precedence fallback so unknown tools do not run silently.
policy_id: fallback_require_approval_unknown_toolsscope: tenant_id: t1subject: type: adapterconditions: {}effect: decision: require_approvalexplanation: No matching policy; require approval for unknown tools. Create a policy from trace to tighten coverage.precedence: 0Related
Section titled “Related”- Governance — Policy model, conditions, approvals
- Operations — Traces, decision replay, create policy from trace
Starter Packs
Section titled “Starter Packs”Install the built-in starter templates locally:
clasper-core policy install safe-defaultsThis writes templates into ./policies/safe-defaults/ and does not auto-activate them in Core.