This repository is a two-minute demo of
Aegis-DevOps, an open-source guardrail that stops AI
agents and automation from running destructive infrastructure changes. Here it runs as the
Aegis-DevOps Plan Check GitHub
Action: every pull request gets a terraform plan, and the plan is checked against signed policy
before anyone can merge it.
infra/ is a tiny "production" stack: a Postgres aws_db_instance and an S3 bucket. Nothing
here touches AWS. The provider has fake credentials, the plan runs with -refresh=false against
the committed terraform.tfstate, and no workflow ever applies. No cloud account is needed.
- Fork this repository, open the fork's Actions tab and enable workflows.
- In your fork, edit
infra/main.tfand delete theaws_db_instance "orders"block. - Open a pull request within your fork (base: your fork's
main).
The plan-check workflow plans the change, and Aegis blocks it:
Plan
tfplan: 2 resource change(s). Decided by:plan-no-db-deletes
- max_matching: 1 delete/replace > 0
A red ❌ on the check is the demo working: Aegis blocked the change, and because the check
fails, a branch rule requiring it keeps the PR from being merged (see the open
example PR). Change something
harmless instead, such as adding another aws_s3_bucket, and the same check passes.
.aegis/is the policy, as written byaegis init: Aegis's example rules, signed with its public example key. Real deployments generate their own key (aegis keygen) and sign their own rules; see Configuration.- The rule that fires,
plan-no-db-deletes, lives in.aegis/plan_constraints.example.yaml. Like every Aegis rule, it only counts because its signature verifies and its author (admin) is allowed to writedeletionrules (.aegis/authority.example.yaml). A rule pasted into a ticket, or edited without re-signing, gets no vote. .github/workflows/plan-check.ymlis the whole integration:terraform plan, thenuses: moneytool/aegis-devops-action@v1.
The same policy can gate an AI coding agent before it runs a command, for example
kubectl delete or terraform destroy typed by Claude Code, Copilot, Cursor, Codex, Gemini CLI or
OpenCode:
pip install aegis-devops && aegis init .aegis
claude plugin marketplace add moneytool/aegis-devops
claude plugin install aegis-devops@aegis-devopsSee Coding agents for the others.
Apache-2.0. The infra/ resources, account ids and ARNs are fictional.