C

Infrastructure Testing Tools

Conftest: Configuration Policy Testing Tool

conftest.dev · checked 1 Oct 2026

A no-cost, open-source tool that tests structured configuration with Open Policy Agent policies.

How it plugs in

—Public API
NoOpen source
YesFree tier

Signal on Infrastructure Testing Tools6.6#6 of 28

Conftest applies Rego policies from Open Policy Agent to structured configuration. It handles Kubernetes YAML, JSON, HCL, Terraform data, Dockerfiles and other formats. Tests can run in CI or use files, directories and standard input, with results available in common CI report formats. Linux, macOS and Windows are supported.

Conftest home page

Review

In a line

This free utility tests structured configuration data. It is built on Open Policy Agent and uses Rego for policy definitions.

What it does

Conftest checks configuration against custom policies. Kubernetes configurations, Tekton pipeline definitions, Terraform code, Serverless configurations and other structured data are among its targets.

A configuration may be supplied as a single file, a directory, multiple files or standard input. Rules can mark deny, violation or warn results, and namespaces help organize policies. The `conftest verify` command executes policy unit tests and reports their results.

Documented inputs include Kubernetes-style YAML, JSON, HCL and HCL2, Dockerfiles, Terraform-related data, JSONnet, TOML, XML and other formats.

How it connects

Linux, macOS and Windows can run Conftest. Installation options include Homebrew, Scoop, Mise, Docker and source builds. The project documents integrations with CircleCI, GitHub Actions and Tekton Pipelines.

Available report styles include plaintext, JSON, TAP, table, JUnit, GitHub, Azure DevOps and SARIF. The GitHub output can add annotations to configuration test results in GitHub workflows.

Policies may be fetched from HTTPS addresses, Git repositories or OCI registries and sent to compatible OCI registries. CLI plugins are available through OCI, local files, Git, HTTP or HTTPS, Mercurial, Amazon S3 and Google Cloud Storage. Pre-commit hooks handle policy testing, verification, documentation, pulling and formatting.

Conftest uses the Apache License 2.0.

Good fit

Conftest suits teams that need configuration checks in continuous integration. It can enforce policies across Kubernetes, Terraform and other structured files, including pull request scanning.

It can fit organizations that want policy files shared from repositories or registries, or that need CI reports in formats used by their existing workflow. See related infrastructure policy as code tools.

Watch for

You need to write policies in Rego, so teams should confirm that language fits their workflow. Check that your configuration format is supported or covered by the documentation.

The `instrumenta/conftest` container image is deprecated; the documentation directs users to `openpolicyagent/conftest`. Questions and discussions go to the Open Policy Agent Slack channel `#opa-conftest`.

Pricing

Conftest is free under the Apache License 2.0 open-source plan, with no paid tier listed in these details.

Verdict

Choose Conftest when configuration policy checks belong in your CI process and you can work with Rego. Its broad input support, CI report formats, policy sharing and plugin options cover many infrastructure workflows.

Look elsewhere if you need a different policy language, a paid support plan or a product whose container and workflow choices are already fixed around another tool.

Our take

Conftest is a practical choice for teams that want repeatable checks on infrastructure and other structured files without paying for the tool. It covers common formats, can read from several input sources and produces reports for many CI systems. The main commitment is learning and maintaining Rego policies. Installation is flexible, but users should avoid the deprecated container image and use the replacement named in the documentation. It makes the most sense when policy checks, pull-request review and CI reporting are central requirements.

  • Free and open source under the Apache License 2.0
  • Runs on Linux, macOS and Windows
  • Supports Kubernetes, Terraform and many structured formats
  • Offers GitHub, JUnit, SARIF and other CI output formats
  • Policies and plugins can be shared through several registries and stores
  • Policies must be written in the Rego language
  • The instrumenta/conftest container image is deprecated
  • Supported formats beyond the listed types require documentation checks
  • Community questions are directed to an Open Policy Agent Slack channel
  • Pick it ifCI-based checks for Kubernetes, Terraform and other configuration; Teams sharing policies through Git, HTTPS or OCI registries; Workflows needing standard CI result formats
  • Skip it ifYou do not want to write or maintain Rego policies; Your configuration format is not among the supported inputs

Pricing

Conftest is free under its Apache License 2.0 open-source plan. No paid plan is listed.

  • Open-source ConftestApache License 2.0Free

As github.com lists them, checked 1 Oct 2026.

Questions

What is Conftest used for?

It applies Open Policy Agent Rego rules to structured configuration, with CI use as a stated focus.

Which files can Conftest check?

Documented inputs cover Kubernetes-style YAML, JSON, HCL and HCL2, Dockerfiles, Terraform-related data, JSONnet, TOML, XML and other formats.

Can Conftest run in GitHub Actions?

Yes. GitHub Actions integration is documented, and the GitHub outputter can annotate configuration test results in workflows.

Is Conftest free?

Yes. It is available as open-source software under the Apache License 2.0.

Where can policies come from?

Policies may be pulled from HTTPS addresses, Git repositories and OCI registries, then pushed to compatible OCI registries.

Which operating systems support Conftest?

Conftest supports Linux, macOS and Windows.