feat(misconf): Support arbitrary file types with custom schema #7158
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
scan/misconfiguration
Issues relating to misconfiguration scanning
Currently by design Trivy has detection logic for a variety of configurations, e.g. Terraform, Cloudformation, etc. as implemented here. Custom checks today assume that the scanned input is one of supported configuration types.
When it comes to implementing support for arbitrary file parsing, there are a few things involved:
Today Trivy limits itself to only scan known configurations. By enabling it to scan simple file types such as JSON or YAML as-is (without looking for the known configuration type) we can enable Trivy to scan newer formats that might not yet be officially supported by Trivy but are written in languages (e.g. JSON or YAML) that trivy knows about, as long as the user provides us with a custom schema to infer the input for evaluation with checks.
Originally posted by @simar7 in #7153 (reply in thread)
The text was updated successfully, but these errors were encountered: