Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(misconf): add comparison with Conftest and tfsec (#1111)
- Loading branch information
Showing
5 changed files
with
74 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# vs Conftest | ||
[Conftest][conftest] is a really nice tool to help you write tests against structured configuration data. | ||
Misconfiguration detection in Trivy is heavily inspired by Conftest and provides similar features Conftest has. | ||
This section describes the differences between Trivy and Conftest. | ||
|
||
| Feature | Trivy | Conftest | | ||
| --------------------------- | -------------------- | -------------------- | | ||
| Support Rego Language | :material-check: | :material-check: | | ||
| Built-in Policies | :material-check: | :material-close: | | ||
| Custom Policies | :material-check: | :material-check: | | ||
| Custom Data | :material-check: | :material-check: | | ||
| Combine | :material-check: | :material-check: | | ||
| Combine per Policy | :material-check: | :material-close: | | ||
| Policy Input Selector[^1] | :material-check: | :material-close: | | ||
| Policy Metadata[^2] | :material-check: | :material-close:[^3] | | ||
| Filtering by Severity | :material-check: | :material-close: | | ||
| Rule-based Exceptions | :material-check: | :material-check: | | ||
| Namespace-based Exceptions | :material-check: | :material-close: | | ||
| Sharing Policies | :material-close: | :material-check: | | ||
| Show Successes | :material-check: | :material-close: | | ||
| Flexible Exit Code | :material-check: | :material-close: | | ||
| Rego Unit Tests | :material-close:[^4] | :material-check: | | ||
| Go Testing | :material-check: | :material-close: | | ||
| Verbose Trace | :material-check: | :material-check: | | ||
| Supported Formats | 6 formats[^5] | 14 formats[^6] | | ||
|
||
Trivy offers built-in policies and a variety of options, while Conftest only supports custom policies. | ||
In other words, Conftest is simpler and lighter. | ||
|
||
Conftest is a general testing tool for configuration files, and Trivy is more security-focused. | ||
People who need an out-of-the-box misconfiguration scanner should use Trivy. | ||
People who don't need built-in policies and write your policies should use Conftest. | ||
|
||
[^1]: Pass only the types of configuration file as input, specified in selector | ||
[^2]: To enrich the results such as ID, Title, Description, etc. | ||
[^3]: Conftest supports [structured errors in rules][conftest-structured], but they are free format and not natively supported by Conftest. | ||
[^4]: Trivy is not able to run `*_test.rego` like `conftest verify`. | ||
[^5]: Dockerfile, HCL, HCL2, JSON, TOML, and YAML | ||
[^6]: CUE, Dockerfile, EDN, HCL, HCL2, HOCON, Ignore files, INI, JSON, Jsonnet, TOML, VCL, XML, and YAML | ||
|
||
|
||
[conftest-structured]: https://github.com/open-policy-agent/conftest/pull/243 | ||
[conftest]: https://github.com/open-policy-agent/conftest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# vs tfsec | ||
[tfsec][tfsec] uses static analysis of your Terraform templates to spot potential security issues. | ||
Trivy uses tfsec internally to scan Terraform HCL files, but Trivy doesn't support some features provided by tfsec. | ||
This section describes the differences between Trivy and tfsec. | ||
|
||
| Feature | Trivy | tfsec | | ||
| --------------------------- | --------------------------------------- | -------------------- | | ||
| Built-in Policies | :material-check: | :material-check: | | ||
| Custom Policies | Rego[^1] | JSON and YAML | | ||
| Policy Metadata[^2] | :material-check: | :material-check: | | ||
| Show Successes | :material-check: | :material-check: | | ||
| Disable Policies | :material-check: | :material-check: | | ||
| Show Issue Lines | :material-close: | :material-check: | | ||
| Support .tfvars | :material-close: | :material-check: | | ||
| View Statistics | :material-close: | :material-check: | | ||
| Filtering by Severity | :material-check: | :material-close: | | ||
| Supported Formats | Dockerfile, JSON, YAML, Terraform, etc. | Terraform | | ||
|
||
[^1]: Terraform HCL files are not supported. | ||
[^2]: To enrich the results such as ID, Title, Description, Severity, etc. | ||
|
||
tfsec is designed for Terraform. | ||
People who use only Terraform should use tfsec. | ||
People who want to scan a wide range of configuration files should use Trivy. | ||
|
||
[tfsec]: https://github.com/tfsec/tfsec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters