Skip to content
PyRank
  • Search
  • PyPI
  • GitHub
  • Insights
  • Compare
  • Advisories
  • Ecosystem
  • About

Policy As Code Python Packages

Python packages with the GitHub topic policy-as-code. Sorted by monthly downloads, with stars and forks.
pulumi
pulumi-policy

Pulumi's Policy as Code SDK, CrossGuard. Define infrastructure checks in code to enforce security, compliance, cost, and other practices, enforced at deployment time.

257K 46 11
commit-check
commit-check

Commit policy as code for teams and AI agents: commit messages, branch names, authors, sign-offs, tags, files and AI attribution, checked from one config file.

83K 102 19
sipyourdrink-ltd
bernstein

Open-source AI agent governance. Write the rules declaratively, Bernstein enforces them and produces the verifiable, replayable record. Free, Apache-2.0. https://bernstein.run

48K 1K 185
mcp-hangar
mcp-hangar

MCP policy enforcement plane — deterministic policy on every Model Context Protocol call: identity, RFC 8707 audience binding, tool schema digest pinning, full audit trail. Python, self-hosted, MIT.

21K 18 10
Rul1an
assay-it

Open evidence profile for MCP tool actions. Enforce configured tool-call policies and record decisions and observations in offline-verifiable bundles. Optional Linux kernel controls. No hosted backend required.

19K 17 3
moneytool
aegis-devops

Aegis: provenance-backed, authority-aware policy verifier that blocks context-poisoned and drifted AI agent actions (kubectl/terraform) before they hit infrastructure

6K 1 0
permitio
opal-common

Policy and data administration, distribution, and real-time updates on top of Policy Agents (OPA, Cedar, ...)

5K 6K 308
agentbreeder
agentbreeder

Open-source preview: deploy existing agent containers to local Docker behind a deploy-time identity gate (Entra, Keycloak, Okta, AWS), with Cedar/OPA policy, second-person approval, a kill switch and a hash-chained audit log.

5K 4 10
permitio
opal-client

Policy and data administration, distribution, and real-time updates on top of Policy Agents (OPA, Cedar, ...)

5K 6K 308
permitio
opal-server

Policy and data administration, distribution, and real-time updates on top of Policy Agents (OPA, Cedar, ...)

4K 6K 308
NKwolv
agent-capmap

Find which combinations of MCP tools let an attacker abuse your AI agents: inventory, classify, policy-as-code, SARIF.

4K 0 0
rowstile
rowstile

Authorization for Postgres apps: access rules in a policy file, compiled to row-level security. Sharing, groups, nested folders, tenants; no second service.

4K 7 1
lucashgrifoni
oss-policy-kit

Open source starter kit for adopting OSS security baselines via policy packs, templates, evidence, and remediation.

4K 3 1
open-coder-ai
chock

Governance-as-code for AI coding agents: author a policy once, enforce it on every agent (Claude, Copilot, Cursor, Codex) via git hooks, CI, and native controls.

4K 11 1
getactra
actra

Actra - control what runs before it runs, controls what actions are allowed before they execute. Evaluate policies across APIs, workflows and AI agents in real time.

4K 2 0
preloop
preloop

The open-source AI agent control plane and software factory: govern every tool and model call.

3K 97 24
Acacian
agent-aegis

LLM guardrails & prompt injection detection for Python. Auto-instruments LangChain, CrewAI, OpenAI, LiteLLM + 8 more frameworks. PII masking, toxicity detection, policy CI/CD. One line, zero code changes.

3K 18 5
manav8498
shadow-diff

Behavior contracts for AI agents

3K 9 0
guardana
guardana-control

AI agent supervision framework in alpha. Decide MCP tool calls by policy and check recorded runs (experimental).

2K 13 1
cleancloud-io
cleancloud

The cloud hygiene platform - including AI and GPU infrastructure

2K 123 11
BambooGap
skills-orchestrator

Govern, audit, and ship AI-agent skills with policy checks, evidence, SBOM, and MCP.

2K 4 0
MatthewTracy
yagami

AI router for local and cloud models that keeps detected sensitive data local.

2K 1 0
microsoft
hobofan-regorus

Python bindings for Regorus - a fast, lightweight Rego interpreter written in Rust

2K 376 86
Traigent
tvl-spec

Tuned Variables Language (TVL) by Traigent: typed specification language, validators, CLI tools, editor support, and docs for governed tuning, validation, and promotion of AI agents.

2K 0 0
    • Original data from PyPI, GitHub, and OSV; downloads served through ClickHouse
    • Sources & methodology