Skip to content
Discussion options

You must be logged in to vote

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:

[AVD-KSV-0001] kubernetes: Process can elevate its own privileges
[AVD-KSV-0024] kubernetes: Access to host ports
[AVD-DS-0011] dockerfile: COPY with more than two arguments not ending with slash
[AVD-DS-0017] dockerfile: 'RUN <package-manager> update' instruction alone
[AVD-DS-0005] dockerfile: ADD inst…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by rvillane
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
scan/misconfiguration Issues relating to misconfiguration scanning
3 participants