Ignoring stuff #3620
Replies: 4 comments 16 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-789In 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.
-
|
While reviewing #8960 (comment), I had a realization about "skipping" flags. It's semantic but important: that all skipping flags are just target specifiers. Skipping is just a way to further refine the target. And by that, perhaps skipping flags shouldn't be a global concept, but target-specific. consider the following:
If I had to rethink this I would say we should remove the skipping flags category and make those flags just special target flags. They will be documented in the targets doc, they won't be supported universally, and their behavior might vary between targets. |
Beta Was this translation helpful? Give feedback.
-
|
In the same pattern on how to ignore some checks/policies. How could someone enforce a check/policy? Is it possible to define a level or a list of checks/policies that CANNOT be ignored? |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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
--policyto--checks3. TODO: Rename
exceptionsrule toskip--ignored-licensedIgnoring (outputs)
Ignoring is supported on the following:
--ignorefile~/.trivyignore: ignore by any ID--ignore-policy: rego policy on results--ignore-unfixed//tfsec:ignoreinline declaration. TODO: turn into//trivy:ignoreSupport Inline Filtering #2961Beta Was this translation helpful? Give feedback.
All reactions