Conftest
A command-line tool that runs Rego policies against configuration files such as Terraform plan JSON, YAML and Dockerfiles.
In more detail
It loads policies from a folder, parses the input files and reports each deny or warn message it finds. It is a convenient way to run plan guardrails in a pipeline with the same policies you test locally.
Related terms
- Open Policy Agent — A general-purpose policy engine that evaluates Rego policies against JSON input and returns a JSON decision.
- terraform plan — The command that compares configuration, state and reality and prints the actions needed to make them match, without changing anything.
Taught in
- Enforcing OPA Guardrails on Terraform Plan Payloads — Cloud Security & DevSecOps Engineering