CODE_CHANGE action class — a dedicated governance domain for AI-driven code modifications with path allowlists, branch restrictions, diff hash requirements, and a two-person rule.
Code Change Governance addresses the intersection of OWASP ASI-03 (Insecure Tool Execution) and ASI-08 (Excessive Agency) — the risk that AI coding agents modify critical files, push to protected branches, or make changes that bypass standard code review processes.
Why This Matters
Compliance alignment: NIST AI RMF (GOVERN 3 — human oversight), ISO 42001 (A.8.4 — system integrity), SOC 2 CC8.1 (change management), EU AI Act Article 14 (human oversight).
CODE_CHANGE Action Class
TheCODE_CHANGE action class is a specialized governance domain for any action that modifies source code, configuration files, or infrastructure-as-code:
Path Allowlists
Path allowlists define which files and directories an agent is permitted to modify. They use glob patterns with negation support:Pattern Syntax
Branch Allowlists
Branch allowlists control which Git branches an agent can push to or create PRs against:Recommended Branch Strategy
Diff Hash Requirement
Every code change must include a cryptographic hash of the diff — creating a tamper-evident record of exactly what was changed:- Non-repudiation — Proves exactly what the agent intended to change
- Tamper detection — Any modification after governance approval is detectable
- Audit trail — Links the governance decision to the specific code change
- Replay prevention — Hash is unique to this specific diff
Two-Person Rule
The two-person rule requires that code changes made by an AI agent are approved by a human before they take effect. This implements the principle that no single entity (human or AI) can unilaterally modify production code.Two-Person Rule Configuration
Integration with CI/CD
Code Change Governance integrates with your existing CI/CD pipeline:Configuration
Related Documentation
- TealEngine v1.3 API — Approval workflow
- Automation Levels — approval_required for code changes
- NHI Governance — Agent identity for code authors
- Anti-Tamper Controls — Bundle integrity
- TealProof — Cryptographic evidence for changes
- OWASP Policy Pack — ASI-03 and ASI-08 coverage

