Write tests against structured configuration data using the Open Policy Agent Rego query language.
Conftest is a command-line tool that allows developers to write and execute tests against structured configuration files using the Rego policy language from Open Policy Agent. It helps validate configuration data for Kubernetes, Terraform, Tekton, and other infrastructure-as-code formats to enforce security, compliance, and organizational policies. By catching misconfigurations early, it reduces the risk of deployment failures and security vulnerabilities.
DevOps engineers, platform teams, and infrastructure developers who manage Kubernetes clusters, Terraform modules, or CI/CD pipelines and need to enforce consistent configuration policies across their environments.
Conftest provides a unified, policy-as-code approach to configuration validation using the widely adopted Rego language, enabling teams to write reusable, composable tests that integrate seamlessly into existing CI/CD workflows without requiring custom scripting.
Write tests against structured configuration data using the Open Policy Agent Rego query language
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses Open Policy Agent's Rego for flexible, composable policy assertions, enabling complex rules like those in the example deployment.rego file for Kubernetes.
Tests configuration files in YAML, JSON, HCL, and more, as highlighted in the README for Kubernetes, Terraform, Tekton, and serverless configs.
Specifically designed to validate Kubernetes resources with built-in examples, such as checking security contexts and label selectors in deployments.
Easily incorporated into automation workflows, as mentioned in the features, to catch misconfigurations early and enforce policies consistently.
Requires learning the niche Rego policy language, which can be a barrier for teams not already familiar with Open Policy Agent, adding setup complexity.
Users must write all policies from scratch or rely on community examples, as Conftest doesn't provide out-of-the-box policy libraries, increasing initial effort.
Only works with structured configuration files; cannot handle unstructured text or binary data, which limits its use for broader validation needs.