Replies: 1 comment 7 replies
-
Hi @nitrocode ! You can ignore misconfigurations by resource parameters https://aquasecurity.github.io/trivy/v0.54/docs/scanner/misconfiguration/#ignoring-by-attributes |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I use workspaces to reuse terraform root directories
For example, the terraform code to provision an s3 bucket is located here
I setup workspaces such as this
My
ue1-dev-my-bucket2.tfvars
containsMy
ue1-prod-my-bucket3.tfvars
containsThen I run trivy for ue1-prod and no issues.
When I run trivy for ue1-dev, I have one issue.
How do I only suppress this issue for
ue1-dev-my-bucket2.tfvars
and notue1-prod-my-bucket3.tfvars
?I can technically do this but this will suppress for both my tfvars files.
I cannot add the comment in beside the input directly to the tfvars file. It seems it has to be in before the module definition.
e.g.
I looked into filtering using the ignore file which would essentially be the same thing as the module definition inline comment.
https://aquasecurity.github.io/trivy/test/docs/configuration/filtering/#by-finding-ids
I looked into filtering by open policy agent
https://aquasecurity.github.io/trivy/test/docs/configuration/filtering/#by-open-policy-agent
This has some promise but looking at the json output, I don't see any way to ignore based on the inputs. Do I have the ability to see which individual inputs were passed in to the outputted json?
Here is my output json
Desired Behavior
It would be nice to suppress/ignore directly in my tfvars files per input that triggers the issue
Or use a rego policy with the context of each individual tfvars, including tfvars file, to suppress/ignore
Actual Behavior
I only have 2 options
Reproduction Steps
See above
Target
AWS
Scanner
Misconfiguration
Output Format
JSON
Mode
Standalone
Debug Output
Operating System
maxOS Sonoma
Version
Checklist
trivy clean --all
references
Beta Was this translation helpful? Give feedback.
All reactions