fix(misconf): directory filtering after scanning #7220
Labels
kind/bug
Categorizes issue or PR as related to a bug.
scan/misconfiguration
Issues relating to misconfiguration scanning
Milestone
Trivy supports scanning Terraform modules that are outside the scan directory, but they cannot be skipped using the
-skip-dirs, --skip-files
flags. We need to filter the result based on the directories after scanning.Discussed in #7191
Originally posted by MatthiasScholzTW July 19, 2024
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
The text was updated successfully, but these errors were encountered: