feat(misconf): Improve logging experience when --ignorefile
not found
#7093
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
scan/misconfiguration
Issues relating to misconfiguration scanning
Milestone
Discussed in #7089
Originally posted by mdirkse July 3, 2024
Description
If an ignore file is specified using the
--ignorefile
flag and that file doesn't exist Trivy does not produce any warning or error as a result of the misconfiguration.Desired Behavior
If I configure a
--ignorefile
flag and the file it poitns to doesn't exist I expect Trivy to fail with a message that the file is missing or at the very least produce a clearly visible warning about the problem.Actual Behavior
The missing file is silently ignored and no indication is given of the misconfiguration.
Reproduction Steps
main.tf
filetrivy config --ignorefile non-existant.yaml . --debug
Target
AWS
Scanner
Misconfiguration
Output Format
Table
Mode
Standalone
Debug Output
Operating System
Linux
Version
Checklist
trivy clean --all
The text was updated successfully, but these errors were encountered: