Skip to content
SPECIFICTION
Get listed

Conftest

conftest.dev

Free plan WindowsmacOSLinux

What it is

Conftest is a free utility for testing structured configuration data, designed for use in CI environments. It uses the Open Policy Agent Rego language to express policies, then evaluates deny, violation, and warning rules within namespaces. Configuration can be read from individual files, directories, multiple 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 output as plaintext, JSON, TAP, table, JUnit, GitHub, Azure DevOps, or SARIF; the GitHub outputter can annotate test results 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 CLI, with downloads available from sources including OCI, Git, HTTP/HTTPS, Mercurial, and cloud storage. Pre-commit hooks support policy workflows, and integrations are documented for CircleCI, GitHub Actions, and Tekton. Conftest is available for Linux, macOS, and Windows.

Spec sheet

Purpose
Conftest is a utility for writing tests against structured configuration data.Read 1 Oct 2026 · conftest.dev
Support
Questions and discussions are directed to the Open Policy Agent Slack channel `#opa-conftest`.Read 1 Oct 2026 · github.com
CI integration
The project documents integrations with CircleCI, GitHub Actions and Tekton Pipelines.Read 1 Oct 2026 · cncf.io
CI outputs
Output formats include JSON, TAP, table, JUnit, GitHub, Azure DevOps, and SARIF.Read 30 Sep 2026 · conftest.dev
Community support
The project directs discussions and questions to the Open Policy Agent Slack #opa-conftest channel.Read 30 Sep 2026 · github.com
Configuration targets
Conftest supports Kubernetes configurations, Tekton pipeline definitions, Terraform code, Serverless configurations and other structured data.Read 1 Oct 2026 · conftest.dev
Deployment options
Conftest can be installed with Homebrew, Scoop, Mise, Docker, or from source.Read 30 Sep 2026 · conftest.dev
Deprecated image
The instrumenta/conftest container image is deprecated and the documentation directs users to openpolicyagent/conftest.Read 30 Sep 2026 · conftest.dev
GitHub integration
The GitHub outputter can annotate configuration test results for GitHub workflows.Read 30 Sep 2026 · conftest.dev
Input methods
Configuration can be tested from files, directories, multiple files, or standard input.Read 30 Sep 2026 · conftest.dev
Output formats
Conftest supports plaintext, JSON, TAP, table, JUnit, GitHub, Azure DevOps and SARIF output.Read 1 Oct 2026 · conftest.dev
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.Read 30 Sep 2026 · conftest.dev
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.Read 1 Oct 2026 · conftest.dev
Policy language
Conftest uses the Open Policy Agent Rego language for writing policies.Read 1 Oct 2026 · conftest.dev
Policy rules
Conftest evaluates deny, violation, and warn rules and supports namespaces.Read 30 Sep 2026 · conftest.dev
Policy sharing
Conftest can pull policies from HTTPS, Git and OCI registries and push policy bundles to compatible OCI registries.Read 1 Oct 2026 · conftest.dev
Policy testing
The `conftest verify` command executes policy unit tests and reports their results.Read 1 Oct 2026 · conftest.dev
Pre-commit
Conftest can run as a pre-commit hook to validate configuration files before committing them.Read 1 Oct 2026 · conftest.dev
Project affiliation
Conftest is a utility built on top of Open Policy Agent.Read 1 Oct 2026 · openpolicyagent.org
Release security
Every release asset, checksums file and container image is attested with GitHub artifact attestations using SLSA provenance statements signed through Sigstore.Read 1 Oct 2026 · conftest.dev
Supported formats
Supported formats include YAML, JSON, HCL/HCL2, Dockerfile, TOML, CUE, XML, INI, SPDX and CycloneDX.Read 1 Oct 2026 · conftest.dev
Target users
Conftest is designed for configuration testing in CI environments.Read 30 Sep 2026 · conftest.dev

Plans and prices

Open-source Conftest Free Apache License 2.0 Read 1 Oct 2026 · github.com

Every Conftest plan and price →

Strong points and limits

Strong points

  • Free under the Apache License 2.0
  • Accepts files, directories, multiple files, or standard input
  • Supports YAML, JSON, HCL, Dockerfiles, and more
  • Offers GitHub, JUnit, SARIF, and other output formats
  • Available for Linux, macOS, and Windows

Limits

  • The deprecated instrumenta/conftest image should not be used
  • Questions are directed to the Open Policy Agent Slack channel

Who it suits

Conftest suits developers and platform teams who need to check structured configuration against policies in CI. Its Rego-based rules and multiple output formats support teams using tools such as GitHub Actions, CircleCI, or Tekton.

Conftest in depth

Read the full write-up

Overview

Conftest is an open-source command-line utility for checking structured configuration against policies written in Open Policy Agent’s Rego language. It suits infrastructure teams that want policy checks in CI and can maintain policy code. Its broad format and CI support are useful strengths; the trade-off is that teams must supply and manage the rules themselves.

Key features

Conftest accepts configuration from files, directories, multiple files, or standard input, and covers Kubernetes-style YAML, JSON, HCL and HCL2, Dockerfiles, Terraform-related data, JSONnet, TOML, XML, and other formats. That breadth makes it a practical fit for teams checking several kinds of infrastructure configuration with one utility. It evaluates deny, violation, and warn rules, supports namespaces, and can run policy unit tests with conftest verify. Teams can therefore check both the configuration and the policies they use to govern it.

CI results can be emitted as plaintext, JSON, TAP, table, JUnit, GitHub, Azure DevOps, or SARIF. The GitHub outputter can annotate workflow results, and documented integrations cover CircleCI, GitHub Actions, and Tekton Pipelines. These options help route findings into existing workflows, though they do not replace the work of authoring 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 be downloaded from OCI, local files, Git, HTTP or HTTPS, Mercurial, Amazon S3, or Google Cloud Storage. Pre-commit hooks cover testing, verifying, documenting, pulling, and formatting policies. This supports teams that want policy work integrated into their development workflow, while the CLI-centered approach may not suit those seeking a visual policy-management service.

Release assets, checksums, and container images carry GitHub artifact attestations with SLSA provenance signed through Sigstore. Installation options include Homebrew, Scoop, Mise, Docker, and source. Use the documented openpolicyagent/conftest image; the older instrumenta/conftest image is deprecated.

Pricing

Conftest is free. The open-source plan costs free under the Apache License 2.0, so teams can use its policy checks without a software subscription. Its value is strongest where the team can provide the policy-writing and maintenance effort; the free price does not turn it into a managed policy service.

Platforms

Conftest supports Linux, macOS, and Windows. The range gives teams options across common developer environments, with Docker also available as an installation route for container-based workflows.

Who it's for

Conftest is a good fit for platform, infrastructure, and security teams that need custom policy checks across Kubernetes, Terraform, Tekton, Serverless, or other structured configuration in CI. Rego and OPA familiarity—or willingness to build it—is important. Teams seeking prebuilt controls or a managed interface should consider a different approach.

Pros and cons

Broad input coverage: One utility handles multiple structured formats and input methods, which is useful when configuration is spread across files and toolchains.

CI-ready results: Multiple output formats, GitHub annotations, and documented integrations make findings easier to place in existing automation.

Policy workflow support: Unit testing, pre-commit hooks, and policy sharing provide practical support for maintaining custom rules.

Requires policy ownership: Rego policies must be written and maintained by the team, so Conftest is less suitable when users expect turnkey policy management.

Container image transition: Users of the deprecated instrumenta image need to adopt openpolicyagent/conftest.

Alternatives

Consider Chef InSpec 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. Choose kubeconform for a free alternative with no paid plans or usage limits stated on its official site. Test Kitchen is another free Apache-licensed option, installable through RubyGems, system packages, or Cinc/Chef Workstation.

AWS CloudFormation may fit readers working with AWS: the service itself is free, while underlying AWS resources are billed separately. Sonobuoy is a free open-source alternative. Terratest is an Apache 2.0 open-source project built by Gruntwork. TFLint is a free open-source command-line Terraform linter, while cfn-lint is a free MIT-0 licensed option supporting Python 3.10–3.14.

Browse Infrastructure Testing Tools, Infrastructure as Code Security Software, and Infrastructure Policy as Code Tools for more options.

Verdict

Choose Conftest if your team needs free, CI-oriented policy checks across varied configuration formats and is prepared to own Rego policies. Its breadth of inputs and automation outputs is the main reason to use it; the need to supply and maintain the policy layer is the main reason to look elsewhere.

Verdict

Conftest provides policy checks for a broad range of structured configuration formats and CI outputs. Teams should use the documented openpolicyagent/conftest image rather than the deprecated instrumenta image.

Where Specifiction places it

Alternatives to ConftestAll alternatives →