Skip to content
Latchkey

Conftest - CI/CD Glossary Definition

Conftest runs OPA/Rego policies against config files from the command line, making it a natural CI gate.

Conftest is a command-line tool that tests structured configuration files (YAML, JSON, HCL, Dockerfile) against Rego policies using the OPA engine.

Conftest brings policy as code directly into pipelines without a running cluster, evaluating any structured config against your rules.

Common usage

A step like conftest test deployment.yaml returns a non-zero exit code when a policy fails, so the build stops on a violation.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →