Add the ability to pass start/end line values as configuration options in Misconfiguration ignorefile config #7325
Replies: 4 comments 3 replies
-
can you use filtering by rego for this? https://aquasecurity.github.io/trivy/v0.54/docs/configuration/filtering/#by-rego |
Beta Was this translation helpful? Give feedback.
-
@michael-a-shelton - that's interesting. Besides what @itaysk mentioned, I think it doesn't hurt to add this in. Although IMHO, keeping granular details closer to the source is better as it's easier to reference what's being cited. In this case, granular line number info is better kept closer to the source (IaC code itself) than elsewhere. |
Beta Was this translation helpful? Give feedback.
-
I submitted a PR: #7339 - This is on behalf of JPMorgan - We would prefer to do this via CCLA if possible. @brooklynrob |
Beta Was this translation helpful? Give feedback.
-
@michael-a-shelton I'm just curious. How are you going to keep the ignore rules up to date with configuration changes? |
Beta Was this translation helpful? Give feedback.
-
Description
The proposal is to add the ability to define the start/end lines as optional config fields in the ignore file.
Currently:
Proposed:
This is a relatively non-invasive small change, adding two fields to the IgnoreFinding struct, passing the values from the calling functions into the
Match
method, where a conditional then does the line comparsions. The value add here is to allow more granular control over the explicit rules being ignored, instead of ignoring the rule across the entire rendered output, but over specific lines in the output.I've made the change in a private fork and have it working and would like to propose pushing the change upstream.
Target
None
Scanner
Misconfiguration
Beta Was this translation helpful? Give feedback.
All reactions