-
DescriptionWhile scanning an image from trivy's example https://github.com/aquasecurity/trivy-ci-test, noticed that I can understand that But I would like to understand the reason behind this decision and if there are any other work-around for this Desired BehaviorTrivy to detect Actual Behavior
Reproduction Steps1. clone https://github.com/aquasecurity/trivy-ci-test
2. `docker build . -t trivy-ci-test`
3. trivy image trivy-ci-test TargetContainer Image ScannerVulnerability Output FormatNone ModeStandalone Debug Output2023-07-04T13:37:47.478+0530 INFO Detected OS: alpine
2023-07-04T13:37:47.478+0530 INFO Detecting Alpine vulnerabilities...
2023-07-04T13:37:47.478+0530 DEBUG alpine: os version: 3.7
2023-07-04T13:37:47.478+0530 DEBUG alpine: package repository: 3.7
2023-07-04T13:37:47.478+0530 DEBUG alpine: the number of packages: 58
2023-07-04T13:37:47.480+0530 INFO Number of language-specific files: 2
2023-07-04T13:37:47.480+0530 INFO Detecting composer vulnerabilities...
2023-07-04T13:37:47.480+0530 DEBUG Detecting library vulnerabilities, type: composer, path: php-app/composer.lock
2023-07-04T13:37:47.480+0530 INFO Detecting cargo vulnerabilities...
2023-07-04T13:37:47.480+0530 DEBUG Detecting library vulnerabilities, type: cargo, path: rust-app/Cargo.lock
2023-07-04T13:37:47.489+0530 WARN This OS version is no longer supported by the distribution: alpine 3.7.1
2023-07-04T13:37:47.489+0530 WARN The vulnerability detection may be insufficient because security updates are not provided Operating SystemWSL VersionVersion: 0.42.1
Vulnerability DB:
Version: 2
UpdatedAt: 2023-07-04 06:09:14.346674696 +0000 UTC
NextUpdate: 2023-07-04 12:09:14.346674396 +0000 UTC
DownloadedAt: 2023-07-04 06:41:58.571723656 +0000 UTC
Java DB:
Version: 1
UpdatedAt: 2023-06-28 00:54:49.597173348 +0000 UTC
NextUpdate: 2023-07-01 00:54:49.597172848 +0000 UTC
DownloadedAt: 2023-06-28 03:04:49.960249058 +0000 UTC Checklist
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
It is a bit complicated now. Please take a look at the doc to understand the behavior. Trivy needs to scan |
Beta Was this translation helpful? Give feedback.
-
Thanks for you reply @knqyf263
Do you mean that once Is there a reason for explicitly disabling lock file analyzers on image scan (for some languages) trivy/pkg/commands/artifact/run.go Line 168 in 8e7fb7c I don't see trivy docs having explanation on that. (also it's not configurable ATM) |
Beta Was this translation helpful? Give feedback.
Yes
There could be unused lock files for testing or any other reasons in container images. Then, it leads to false detection. We've got many complaints about it.
What do you mean?