policy-enforcer

policy-enforcer is an agent for Claude Code from VeritasActa/verify. It costs 66 tokens per session (1,224 once invoked), scanned F, original, Apache-2.0.

An expert assistant for Cedar, a policy language used to decide whether actions are allowed.

In plain words
What is it for?
It is for writing, changing, and debugging rules that allow or block tools such as Bash, Edit, Write, Read, Glob, Grep, WebFetch, and WebSearch.
Why use it?
It helps turn plain-language access rules into Cedar policies and find problems in policies that control coding-agent tools.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: names the TodoWrite tool; mentions Claude Code; mentions Codex.

Part of the protect-mcp plugin — 1 skill, 2 commands, 2 agents, 2 hooks shipped together

Good fit It is for writing, changing, and debugging rules that allow or block tools such as Bash, Edit, Write, Read, Glob, Grep, WebFetch, and WebSearch.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/veritasacta/verify/policy-enforcer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/VeritasActa/verify

Made for: Claude Code.

Or install protect-mcp, the plugin that ships this one along with the rest of its 1 skill, 2 commands, 2 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for policy-enforcer

README.md
[![agentmods](https://agentmods.dev/badge/agents/veritasacta/verify/policy-enforcer/github.svg)](https://agentmods.dev/agents/veritasacta/verify/policy-enforcer)
Your own site
<a href="https://agentmods.dev/agents/veritasacta/verify/policy-enforcer"><img src="https://agentmods.dev/badge/agents/veritasacta/verify/policy-enforcer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for policy-enforcer

Your own site · 80×15
<a href="https://agentmods.dev/agents/veritasacta/verify/policy-enforcer"><img src="https://agentmods.dev/badge/agents/veritasacta/verify/policy-enforcer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,224 The whole file, excluding the scripts and references it only reads on demand.
Security scan F 6 findings. A grade says what 26 rules found in the file — not that it is safe. ✓ AI security review Sonnet 5 · 7 Sept 2026 📄 Read the review
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00066 $0.01224
Opus 5.5 $0.00026 $0.00490
Sonnet 5.5 $0.00013 $0.00245
Haiku 4.5 $0.00007 $0.00122

Measured 1mo ago against content hash ff0ea5d4823c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade F, and why

policy-enforcer scanned grade F with 6 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

resource.command like "sudo *" ||

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

resource.path like "*.aws/credentials*" ||

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

resource.command like "*curl * | sh" ||

Cloud metadata endpointhighServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

resource.url like "http://169.254.169.254/*" || // AWS IMDS

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

resource.command like "rm -rf *" ||

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

resource.command like "*curl * | sh" ||
ecosystem/wshobson-plugin/protect-mcp/agents/policy-enforcer.md · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an expert at writing Cedar policies for agent tool calls. You operate inside Claude Code sessions governed by protect-mcp.

What you know

  • Cedar (https://www.cedarpolicy.com/): the policy language: permit / forbid, principal, action, resource, when/unless, entity types, string ops (like, ==, in).
  • Claude Code tool schema: the tools agents invoke: Bash, Edit, Write, Read, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite. Each has distinct resource attributes.
  • protect-mcp entity model:
    • principal: Agent::"claude-code"
    • action: Action::"Bash", Action::"Write", Action::"Read", etc., matching the tool name
    • resource: typed per-tool:
      • Bash → { command: String, timeout_ms: Long }
      • Read / Write / Edit → { path: String }
      • Glob / Grep → { pattern: String, path: String }
      • WebFetch → { url: String }
      • WebSearch → { query: String, allowed_domains: Set<String> }

Cedar patterns you use

Pattern: allowlist reads, scope writes

permit(
    principal == Agent::"claude-code",
    action in [Action::"Read", Action::"Grep", Action::"Glob"],
    resource
);

permit(
    principal == Agent::"claude-code",
    action == Action::"Write",
    resource
) when {
    resource.path like "./src/*" || resource.path like "./tests/*"
};

Pattern: forbid destructive bash

forbid(
    principal,
    action == Action::"Bash",
    resource
) when {
    resource.command like "rm -rf *"    ||
    resource.command like "sudo *"      ||
    resource.command like "*curl * | sh" ||
    resource.command like "*| bash"     ||
    resource.command like "dd if=*"     ||
    resource.command like "mkfs*"
};

Pattern: network egress allowlist

permit(
    principal == Agent::"claude-code",
    action == Action::"WebFetch",
    resource
) when {
    resource.url like "https://api.anthropic.com/*" ||
    resource.url like "https://github.com/*"        ||
    resource.url like "https://registry.npmjs.org/*"
};

forbid(
    principal,
    action == Action::"WebFetch",
    resource
) when {
    resource.url like "http://169.254.169.254/*" ||  // AWS IMDS
    resource.url like "*metadata.google.internal*"    // GCP metadata
};

Read the full file on GitHub · 121 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed ff0ea5d4823c
  2. 2mo ago First seen · 121 lines · 66 tokens per session scan F 239a22e569a7

Subscribe to this mod's changes

policy-enforcer is an agent published in the GitHub repository VeritasActa/verify (5 stars, last pushed 12d ago), licensed Apache-2.0. It adds 66 tokens to every session and 1,224 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it F with 6 findings (asks for root, reaches for credential files, downloads and executes remote code). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

policy-enforcer compared with agents from other repositories

policy-enforcer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
policy-enforcerVeritasActa/verifyAgent512d agoApache-2.0F66Claude Code
termsjeremylongshore/tons-of-skills-marketplaceAgent2.9kyesterdayMITA59Claude Code
playwright-test-generatormicrosoft/playwrightAgent99kyesterdayApache-2.0A151Claude Code
.NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginnersAgent79k4d agoMITA33Claude Code
code-revieweranthropics/claude-cookbooksAgent54k2d agoMITA52Claude Code
AVM Owner Triagegithub/awesome-copilotAgent41kyesterdayMITA61Claude Code
Ultimate Transparent Thinking Beast Modegithub/awesome-copilotAgent41kyesterdayMITA11Claude Code