Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trivy doesn't skip directories when using doublestar in --skip-dirs flag #4853

Closed
nikpivkin opened this issue Jul 21, 2023 · 0 comments · Fixed by #4854
Closed

trivy doesn't skip directories when using doublestar in --skip-dirs flag #4853

nikpivkin opened this issue Jul 21, 2023 · 0 comments · Fixed by #4854
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@nikpivkin
Copy link
Contributor

I have the following file structure:

.
├── .terraform
│   ├── modules
│   └── providers
├── .terraform.lock.hcl
├── test
│   └── foo
│       ├── .terraform
│       │   ├── modules
│       │   ├── providers
│       ├── .terraform.lock.hcl
│       └── test.tf
├── test.tf

I pass the skip-dirs flag to skip all .terraform directories, but they are scanned anyway:

trivy config -d . --skip-dirs "**/.terraform"
...
2023-07-21T15:36:06.638+0600    DEBUG   Scanned config file: .terraform/modules/gke/test/fixtures/shared_vpc
2023-07-21T15:36:06.638+0600    DEBUG   Scanned config file: .terraform/modules/gke/test/fixtures/shared_vpc/network.tf
....
2023-07-21T15:36:06.641+0600    DEBUG   Scanned config file: test/foo/.terraform/modules/s3-bucket/examples/notification
2023-07-21T15:36:06.641+0600    DEBUG   Scanned config file: test/foo/.terraform/modules/s3-bucket/examples/notification/main.tf
@nikpivkin nikpivkin added the kind/bug Categorizes issue or PR as related to a bug. label Jul 21, 2023
@nikpivkin nikpivkin self-assigned this Jul 21, 2023
@nikpivkin nikpivkin changed the title trivy doesn't skip directories when using doublestar trivy doesn't skip directories when using doublestar in --skip-dirs flag Jul 21, 2023
@simar7 simar7 added this to the v0.44.0 milestone Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants