macOS
brew install conftestlocal Homebrew formula metadata
安装
brew install conftestlocal Homebrew formula metadata
nix profile install nixpkgs#conftestnixpkgs package indexes · pkgs/by-name/co/conftest/package.nix · 来源: api.github.com
sudo zypper install conftestopenSUSE Tumbleweed package metadata · conftest · 来源: download.opensuse.org
scoop install main/conftestScoop official bucket manifest trees · bucket/conftest.json · 来源: api.github.com
概览
Test your configuration files using Open Policy Agent
历史
Conftest is an Open Policy Agent project for testing structured configuration data with Rego policies. It is commonly used to check Kubernetes manifests, Terraform, Tekton, Serverless configuration, and other machine-readable config before deployment.
The README and documentation describe Conftest as a utility for writing tests against structured configuration data and explicitly ground its policy language in Open Policy Agent's Rego. The project lives under the open-policy-agent GitHub organization and documents discussion in the OPA Slack #opa-conftest channel.
The documentation evolved from Kubernetes examples into a broader parser and policy-testing tool. It supports many formats including CUE, Dockerfile, HCL/HCL2, INI, JSON, Jsonnet, nginx, TOML, XML, YAML, CycloneDX, SPDX, and others, making it useful for policy-as-code checks across infrastructure repositories.
Conftest's adoption tracks the rise of policy-as-code in infrastructure delivery: it lets teams test configs locally, in CI, and through pre-commit before tools such as Kubernetes, Terraform, or deployment platforms consume them. Package-manager availability in Homebrew, Nix, Scoop, and zypper reflects that it is treated as a portable developer and CI binary.
Typical usage is to place Rego files under a policy directory and run conftest test against one or more config files. The tool evaluates deny, violation, and warn rules in the main namespace by default, but supports namespace flags, stdin, metadata, unit tests with conftest verify, and parser builtins for policy tests.
For package curators, Conftest is notable because it packages OPA's policy engine into a focused CLI for files rather than services. It turns Rego from a runtime authorization language into a general-purpose config linting and testing binary that can sit cleanly in CI images and developer package sets.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
./conftest.toml可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
conftest | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/open-policy-agent/conftest
安装元数据
| 软件包键 | brew:conftest |
|---|---|
| 版本 | 0.68.2 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/conftest |
| 主页 | https://www.conftest.dev/ |
| 仓库 | https://github.com/open-policy-agent/conftest |
| 上游文档 | https://www.conftest.dev/ |
| 许可证 | Apache-2.0 |
| 源码归档 | https://github.com/open-policy-agent/conftest/archive/refs/tags/v0.68.2.tar.gz |
| 构建依赖 | go |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | conftest |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
conftest
nix profile install nixpkgs#conftestconftest 0.68.2-1.1
Tool to write tests against structured configuration data
https://github.com/open-policy-agent/conftest
sudo zypper install conftestconftest-bash-completion 0.68.2-1.1
Bash Completion for conftest
https://github.com/open-policy-agent/conftest
sudo zypper install conftest-bash-completionconftest-fish-completion 0.68.2-1.1
Fish Completion for conftest
https://github.com/open-policy-agent/conftest
sudo zypper install conftest-fish-completionconftest-zsh-completion 0.68.2-1.1
Zsh Completion for conftest
https://github.com/open-policy-agent/conftest
sudo zypper install conftest-zsh-completionmain/conftest
scoop install main/conftest来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.