Skip functionality not working when a path is set (--skip-dirs, --skip-files) #7191
Closed
MatthiasScholzTW
started this conversation in
Bugs
Replies: 3 comments 2 replies
-
Hi @MatthiasScholzTW ! Thanks for the report, I'll investigate this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@knqyf263 I found that a virtual filesystem is created with underlying root, which allows access outside of the target path, but this is not handled in any way when skipping files. Is it necessary to implement re-filtering after the scan, or is there an easy way to skip this? |
Beta Was this translation helpful? Give feedback.
2 replies
-
Track #7220 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
When using a subdirectory for the scanning the commands
--skip-dirs
and--skip-files
are ignored.Example:
trivy fs --scanners misconfig --skip-dirs "../modules" deployments
Desired Behavior
The skipping functionality supports using path within a project root folder.
Actual Behavior
The expressions provided within --skip-dirs and --skip-files are ignored.
Reproduction Steps
Target
Filesystem
Scanner
Misconfiguration
Output Format
None
Mode
Standalone
Debug Output
Operating System
macOS 14.5
Version
Checklist
trivy clean --all
Beta Was this translation helpful? Give feedback.
All reactions