-
|
Hi, Is there a simple way to get a list of all validation rules to detect misconfigurations ? Here I'm referring to the rules typically implemented in Rego, used when running I have reviewed the trivy CLI help, but couldn't find anything evident. thanks for your help |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
I think AVD helps. @liamg may have other information. |
Beta Was this translation helpful? Give feedback.
-
|
Depending on what exactly you need to know about each rule, you could use something like this: package main
import (
"fmt"
_ "github.com/aquasecurity/defsec/pkg/rego"
"github.com/aquasecurity/defsec/pkg/rules"
)
func main() {
for _, rule := range rules.GetRegistered() {
r := rule.Rule()
fmt.Printf("[%s] %s: %s\n", r.AVDID, r.Provider, r.Summary)
}
}This yields the following: |
Beta Was this translation helpful? Give feedback.
-
|
thanks a lot, that was exactly what I was looking for. Below is a modified version of the code that customizes the output for my specific needs in case it helps someone else. |
Beta Was this translation helpful? Give feedback.
Depending on what exactly you need to know about each rule, you could use something like this:
This yields the following: