Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

Conftest

conftest.dev

  • Free plan
  • Windows
  • macOS
  • Linux
7.9 Club score Visit conftest.dev

What Conftest is

Conftest is a free utility for testing structured configuration data, with a focus on use in continuous integration environments. It uses the Open Policy Agent Rego language to define policies and evaluates deny, violation and warning rules organized into namespaces. Configurations can be checked from a file, directory, several files or standard input. Supported inputs include Kubernetes-style YAML, JSON, HCL and HCL2, Dockerfiles, Terraform-related data, JSONnet, TOML and XML. Results can be produced as plaintext, JSON, TAP, table, JUnit, GitHub, Azure DevOps or SARIF output; the GitHub formatter can annotate findings in workflows. The `conftest verify` command runs policy unit tests. Policies can be pulled from HTTPS URLs, Git repositories and OCI registries, or pushed to compatible OCI registries. Plugins extend the command-line tool, and pre-commit hooks support policy workflows. Conftest documents integrations with CircleCI, GitHub Actions and Tekton. It is built on Open Policy Agent and is available for Linux, macOS and Windows. The instrumenta/conftest container image is deprecated; the documentation directs users to openpolicyagent/conftest.

Who it suits

Conftest suits people testing structured configuration and policies in CI environments, including users working with Kubernetes, Terraform and other supported formats.

Good to know, and what to watch

  • Free utility for configuration testing.
  • Supports Rego policies and policy unit tests.
  • Accepts a wide range of structured formats.
  • Offers CI-friendly output formats, including SARIF.
  • Documents CircleCI, GitHub Actions and Tekton integrations.
  • The instrumenta/conftest container image is deprecated.
  • Questions and discussions are directed to Open Policy Agent Slack.

Open-source Conftest

Free

Free plan

Getting started

  1. Install Conftest with Homebrew, Scoop, Mise, Docker or from source
  2. Write policies in the Open Policy Agent Rego language
  3. Provide a file, directory, multiple files or standard input
  4. Run policy checks and use conftest verify for policy unit tests
  5. Select plaintext, JSON, TAP, table, JUnit, GitHub, Azure DevOps or SARIF output
  6. Add documented CircleCI, GitHub Actions or Tekton integration

The Club's review

Overview

Conftest is a free command-line utility for checking structured configuration against policies written in Open Policy Agent’s Rego language. It is best suited to teams that want configuration checks in CI and are prepared to write and maintain policy code. Its broad format support and automation-friendly outputs are compelling; teams seeking a visual, turnkey policy service should look elsewhere.

Key features

Conftest accepts Kubernetes-style YAML, JSON, HCL and HCL2, Dockerfiles, Terraform-related data, JSONnet, TOML, XML, and other formats. Teams can check a file, directory, set of files, or standard input, so the same utility can fit different points in a configuration workflow. It evaluates deny, violation, and warn rules and supports namespaces. The conftest verify command also runs policy unit tests, letting teams validate policy logic as well as the configurations it governs.

For CI, results can be emitted as plaintext, JSON, TAP, table, JUnit, GitHub, Azure DevOps, or SARIF. The GitHub outputter can annotate results in workflows, and documented integrations cover CircleCI, GitHub Actions, and Tekton Pipelines. This makes Conftest adaptable to established pipelines, though it does not remove the work of creating and maintaining Rego policies.

Policies can be pulled from HTTPS URLs, Git repositories, and OCI registries, and pushed to compatible OCI registries. Plugins extend the CLI and can come from OCI registries, local files, Git, HTTP or HTTPS, Mercurial, Amazon S3, or Google Cloud Storage. Pre-commit hooks cover testing, verifying, documenting, pulling, and formatting policies. These options help teams share and manage policy work in existing developer workflows, but also mean users are working with a CLI and its surrounding tooling rather than a managed policy interface.

Releases have GitHub artifact attestations: release assets, the checksums file, and container images are covered by SLSA provenance signed through Sigstore. Installation options include Homebrew, Scoop, Mise, Docker, and building from source. Users of the deprecated instrumenta/conftest image should switch 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. Its open-source plan costs free. There are no paid tiers to weigh against the free version, making it a straightforward choice for teams comfortable operating the tool themselves.

Platforms

Conftest supports Linux, macOS, and Windows. Its installation choices include package managers, Docker, and source, giving teams several ways to fit it into their environment.

Who it's for

Conftest is a strong fit for infrastructure and platform teams that want policy checks for Kubernetes configurations, Terraform code, Tekton pipeline definitions, Serverless configurations, and other structured data in CI. Its Rego foundation suits teams already using Open Policy Agent or willing to learn and maintain policy code. It is less suitable for organizations that want policy checks without coding rules or managing a command-line workflow.

Pros and cons

  • Pros: Broad input-format support lets one tool address multiple configuration types, rather than only one infrastructure format.
  • Pros: CI-specific outputs, including GitHub annotations, JUnit, Azure DevOps, and SARIF, help teams surface findings in their existing workflows.
  • Pros: Policy unit tests, pre-commit hooks, and policy sharing options support a fuller policy development and distribution workflow.
  • Pros: The Apache-licensed tool is free, and release assets and container images carry signed provenance attestations.
  • Cons: Teams must author and maintain Rego policies, so it is not a no-code policy solution.
  • Cons: It is a CLI utility rather than a managed visual service, which may be a poor fit for teams seeking centralized, point-and-click policy administration.

Alternatives

Chef InSpec is worth considering if you want a freemium option with a free tier limited to non-production workloads and personal, non-commercial use, plus a 30-day trial.

Test Kitchen is another free, Apache-licensed option for Linux, macOS, and Windows; choose it when its RubyGems, system-package, or Cinc/Chef Workstation installation paths suit your needs.

kubeconform is a free alternative for teams looking for a tool with Linux, macOS, self-hosted, and Windows support.

Terratest is an Apache 2.0 open-source project built by Gruntwork and is a possible alternative for Linux users.

CloudSploit offers a self-hosted open-source version as well as a commercial hosted version.

AWS CloudFormation may suit teams choosing a freemium service; the service itself is free, while underlying AWS resources are billed at their own rates.

cfn-lint is a free, MIT-0 licensed option for teams using Python 3.10–3.14.

Checkov is a free, Apache-2.0 open-source CLI alternative for Linux and macOS.

Compare more options in Infrastructure Testing Tools, Infrastructure as Code Security Software, and Infrastructure Policy as Code Tools.

Verdict

Choose Conftest if you need free, CI-oriented policy checks across varied configuration formats and can work with Rego. Its strongest reason to choose it is the combination of broad input support and outputs that fit common automation workflows. Look elsewhere if your team needs policy enforcement without writing code or wants a managed visual interface.

The verdict

Conftest provides policy-based checks for configuration files and CI workflows across several formats. Users of the deprecated instrumenta container image should move to the image named in the documentation.

Questions people ask

What does Conftest cost?

Conftest is free. The Open-source Conftest plan is free under the Apache License 2.0.

Which operating systems are supported?

Conftest is available for Linux, macOS and Windows.

What formats can it test?

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

Can it scan Terraform and Kubernetes configurations?

Yes. Terraform analysis and Kubernetes analysis are listed capabilities, along with support for related configuration targets.

Does Conftest integrate with GitHub workflows?

Its GitHub outputter can annotate configuration test results for GitHub workflows, and the project documents GitHub Actions integration.

Where can users get support?

The project directs questions and discussions to the Open Policy Agent Slack channel #opa-conftest.

What the maker publishes

CI integration
The project documents integrations with CircleCI, GitHub Actions and Tekton Pipelines. source
CI outputs
Output formats include JSON, TAP, table, JUnit, GitHub, Azure DevOps, and SARIF. source
Community support
The project directs discussions and questions to the Open Policy Agent Slack #opa-conftest channel. source
Configuration targets
Conftest supports Kubernetes configurations, Tekton pipeline definitions, Terraform code, Serverless configurations and other structured data. source
Deployment options
Conftest can be installed with Homebrew, Scoop, Mise, Docker, or from source. source
Deprecated image
The instrumenta/conftest container image is deprecated and the documentation directs users to openpolicyagent/conftest. source
GitHub integration
The GitHub outputter can annotate configuration test results for GitHub workflows. source
Input methods
Configuration can be tested from files, directories, multiple files, or standard input. source
Output formats
Conftest supports plaintext, JSON, TAP, table, JUnit, GitHub, Azure DevOps and SARIF output. source
Plugins
Conftest plugins extend the CLI and can be downloaded from OCI registries, local files, Git, HTTP/HTTPS, Mercurial, Amazon S3 and Google Cloud Storage. source
Plugin system
Plugins can extend the Conftest CLI and can be downloaded through OCI, local files, Git, HTTP/HTTPS, Mercurial, Amazon S3, or Google Cloud Storage. source
Policy language
Conftest uses the Open Policy Agent Rego language for writing policies. source
Policy language
Conftest uses the Open Policy Agent Rego language for writing policies. source
Policy rules
Conftest evaluates deny, violation, and warn rules and supports namespaces. source
Policy sharing
Policies can be pulled from HTTPS URLs, Git repositories, and OCI registries, and pushed to compatible OCI registries. source
Policy sharing
Conftest can pull policies from HTTPS, Git and OCI registries and push policy bundles to compatible OCI registries. source
Policy testing
The `conftest verify` command executes policy unit tests and reports their results. source
Pre-commit
Conftest provides pre-commit hooks for testing, verifying, documenting, pulling, and formatting policies. source
Pre-commit
Conftest can run as a pre-commit hook to validate configuration files before committing them. source
Project affiliation
Conftest is a utility built on top of Open Policy Agent. source
Purpose
Conftest is a utility for writing tests against structured configuration data. source
Purpose
Conftest is a utility for writing tests against structured configuration data. source
Release security
Every release asset, checksums file, and container image is attested with GitHub artifact attestations using SLSA provenance signed through Sigstore. source
Release security
Every release asset, checksums file and container image is attested with GitHub artifact attestations using SLSA provenance statements signed through Sigstore. source

Checked against the maker's pages on 1 Oct 2026.