Ignoring stuff #3620
Replies: 2 comments 5 replies
-
That makes sense to me. I just want to raise one thing that is confusing to me as a user
So far, to me, the --policy flag refers to anything I define through rego -- whether that is to check something specific or to skip a check so I am not sure I follow the reasoning behind having to divide it into --checks and --skip-checks? Also, --ignore-policy currently refers to Rego which tells the vulnerability check to ignore a vulnerability in the reported scan result, which is different to what we currently call exceptions. How does this translate, if there is a difference in scanning, would it be confusing for users if it is all names --skip-checks? as a next step, we have to discuss the different sections in the docs that need to be updated or rewritten. |
Beta Was this translation helpful? Give feedback.
-
Just wanted to add my 2c here. As far as ignoring particular policies are concerned, we could add support for more granular checks that could be potentially scoped per file, if need be. So for example: ---
AVD-DS-123
- "path/to/dockerfile1"
- "path/to/dockerfile2"
CVE-2023-456
- "someimage:latest"
AVD-DS-789 In this case, both For this particular example it is the two Docker files and one image with a tag respectively. In these two cases, these two will only be ignored within the specified elements. As for the |
Beta Was this translation helpful? Give feedback.
-
There's a bit of confusion around how to ignore things, and what is supported (#3490, #3486, #3572)
I think the docs needs rewriting around that area. I had a chat with @knqyf263 and we realized this is more involved than just rewriting the doc. Here's how I currently see things. I'm sharing it here for feedback, and if there aren't objections we can create issues and follow this plan.
Terminology
The words we used around "policy", and "ignore" were ambiguous. I propose the following (for now just for this doc, in the future maybe more)
Skipping (inputs)
Skipping is supported on the following:
--skip-files
--skip-dir
--policy
. A rego file can contain conftest-inspired exception policy.1. Rename
--policy
to--checks
3. TODO: Rename
exceptions
rule toskip
--ignored-licensed
Ignoring (outputs)
Ignoring is supported on the following:
--ignorefile
~/.trivyignore
: ignore by any ID--ignore-policy
: rego policy on results--ignore-unfixed
//tfsec:ignore
inline declaration. TODO: turn into//trivy:ignore
Support Inline Filtering #2961Beta Was this translation helpful? Give feedback.
All reactions