Skip to content

Exit code for misconfiguration scan? #1561

Answered by knqyf263
oliviergaumond asked this question in Q&A
Discussion options

You must be logged in to vote

From what I see there is no option to specify an exit-code that would fail the build if a misconfiguration is found with the built-in policy. Nor do I see an option to output to a json format that we could easily parse.

Did you try trivy config -h?

NAME:
   trivy config - scan config files

USAGE:
   trivy config [command options] dir

OPTIONS:
   --template value, -t value                     output template [$TRIVY_TEMPLATE]
   --format value, -f value                       format (table, json, template) (default: "table") [$TRIVY_FORMAT]
   --severity value, -s value                     severities of vulnerabilities to be displayed (comma separated) (default: "UNKNOWN,LOW,MEDIUM,HIGH…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ogaumond-rq
Comment options

Answer selected by knqyf263
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants