Skip to main content

Terraform plan risk explainer — reads `terraform plan` JSON and classifies each change as safe/review/dangerous/irreversible.

Project description

readtheplan

Read the plan. Every time. For real.

Version License CI Downloads Stars

Terraform plan risk analysis for humans, CI pipelines, and AI agents. Classifies every change as safe, review, dangerous, or irreversible. Produces compliance evidence for SOC 2, ISO 27001, and HIPAA. Runs locally — no uploads, no accounts, no backend.

pip install readtheplan && readtheplan analyze plan.json

Website · Demo · Docs · Contributing


Why this exists

Terraform's plan/apply separation exists so a human reviews changes before they hit prod. In practice, nobody reads the 4,000-line text blob. Code diffs ≠ plan diffs. AI agents skip review. Compliance reviewers drown.

I reviewed hundreds of Terraform plans manually before building this. The same patterns kept killing us: a destroy+create that looked like an update, a KMS key rotation that nobody flagged, an IAM policy that quietly opened a bucket to the world. Every incident postmortem had the plan diff attached — and every one of them was reviewed and approved by a human who missed the signal.

Read the full story →

What it does

readtheplan reads terraform plan JSON and classifies each change:

🟢 safe — no-op, tag update, read-only change 🟡 review — security group rule change, minor config drift 🟠 dangerous — instance replacement, IAM policy change, database modification 🔴 irreversible — data deletion, KMS key destruction, RDS instance termination

It applies resource-aware rules (30+ AWS resource types), compliance framework mappings (SOC 2, ISO 27001, HIPAA), and produces auditable evidence envelopes with sigstore-backed signed attestations.

Comparison: readtheplan vs. everything else

Tool Analyzes Risk tiers Compliance evidence Agent gate Local-only
readtheplan Plan diff ✅ 4 tiers ✅ SOC2/ISO/HIPAA ✅ proceed/warn/block
tflint Code (HCL) ❌ lint only
tfsec Code (HCL) ❌ security only
checkov Code + plan ⚠️ pass/fail ⚠️ policy checks
Spacelift Plan + state ⚠️ visual only ⚠️ policy gates ❌ SaaS
env0 Plan + state ⚠️ visual only ❌ SaaS
Snyk IaC Code (HCL) ❌ security only ❌ SaaS
infracost Plan diff ❌ cost only ❌ SaaS
OPA/Sentinel Policy engine ⚠️ rule-based ⚠️ ⚠️ policy gates

readtheplan is the only tool that: classifies plan diffs by blast radius risk tier, annotates with compliance controls, produces auditable evidence envelopes, gates CI pipelines and AI agents, and runs entirely locally with no SaaS dependency.

Quickstart

CLI — 30 seconds to first result

# Install
pip install readtheplan

# Generate a plan
terraform plan -out=tfplan -input=false
terraform show -json tfplan > plan.json

# Analyze it
readtheplan analyze plan.json

# With compliance framework
readtheplan analyze --framework soc2 plan.json

# Machine-readable JSON
readtheplan analyze --format json plan.json

GitHub Action — gate your CI pipeline

- name: Analyze Terraform plan
  uses: readtheplan/readtheplan@v1
  with:
    plan-file: plan.json

Full GitHub Actions workflow →

AI agent gate — block unsafe auto-approvals

readtheplan agent-gate plan.json
# → {"decision": "block", "risk": "irreversible", ...}

Use this in your CI or coding agent pipeline to enforce human review on dangerous changes.

Features

  • CLI-first — single pip install, runs anywhere Python runs
  • GitHub Action — copy-paste into any workflow
  • Resource-aware rules — 30+ AWS resource types: KMS, IAM, RDS, S3, EKS, Lambda, networking, etc.
  • Compliance evidence — SOC 2, ISO 27001, HIPAA control mappings with signed JSON envelopes
  • Agent gate — deterministic proceed/warn/block decisions for CI and AI agents
  • Customer rule overlays — org-specific risk escalations via YAML, no code changes needed
  • MCP preview — local stdio tools for agent and IDE integrations
  • No uploads — your Terraform plan JSON never leaves your machine
  • MIT licensed — use it anywhere, no strings attached

What's not in scope

  • Multi-cloud beyond AWS (Terraform/OpenTofu only for now)
  • SaaS dashboard (local-first by design)
  • Policy-as-code engine (OPA/Sentinel exist for that)
  • Competing with Spacelift/env0 on overlapping features

Documentation

Contributing

Contributions are welcome! See CONTRIBUTING.md for:

  • Development environment setup
  • How to run tests
  • What makes a good first issue
  • PR review process
  • AI assistance disclosure policy

Good first issues are tagged good first issue.

Status

v0.3 — stable CLI + GitHub Action. The PyPI package ships the Python CLI and composite GitHub Action. Current main includes: resource-aware AWS risk rules, compliance framework annotations, evidence envelopes, signed attestation verification, customer rule overlays, MCP preview, examples, benchmarks, and the static onboarding site.

What's shipping next: in-browser plan playground (upload your plan, see results instantly), CloudFormation/Pulumi adapters, PCI-DSS and NIST 800-53 catalogs, expanded AWS resource coverage.

License

MIT — see LICENSE.

Author

@texasich — OSS contributions welcome.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

readtheplan-0.3.0-py3-none-any.whl (50.4 kB view details)

Uploaded Python 3

File details

Details for the file readtheplan-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: readtheplan-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 50.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for readtheplan-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e88b1a833541c8d0392c822254785c6947868ae477273cb5e897c8ccd28311fd
MD5 2a68f648289169c4817b5c942cf2f818
BLAKE2b-256 27267f4d51e9599bb1b86810aef7d332fe379a34a9cd1aada5076b57cfa67b73

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page