-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
npm: inconsistent results when dependency has both a dev and non-dev entry in lockfile #5139
Comments
@nikpivkin I notice you changed the reproduction steps to include installing the dependencies in a fresh project. That won't work out of the box because newer patch versions of "overrides": {
"gulp": {
"fsevents": "1.2.9"
}
} Or, probably simpler, change the instructions to |
@ngraef Good catch, I fixed it |
Repost from #5134 (comment)
Is there anything else I can do to help move this forward? |
Is there any update on this issue? |
Any updates here? Issue seems to be consistently reproducible. |
Hi all! |
Discussed in #5134
Originally posted by ngraef September 7, 2023
Description
Trivy is giving inconsistent results between successive vulnerability scans with the same database version. A sample
package-lock.json
that induces the behavior is included (collapsed) below. I believe the issue is triggered by the same package ID (name@version
) having multiple entries in the lockfile, where one has"dev": true
and another doesn't. In this sample,[email protected]
meets that condition.Related: aquasecurity/go-dep-parser#149
Desired Behavior
I expect the scan results to be determinate and include all affected non-dev packages. With the sample lockfile, the expected output is:
Actual Behavior
With the sample lockfile, the output excludes
[email protected]
in roughly 50% of scans:Reproduction Steps
Target
Filesystem
Scanner
Vulnerability
Output Format
Table
Mode
Standalone
Debug Output
Operating System
macOS Ventura 13.5.1
Version
Checklist
trivy image --reset
The text was updated successfully, but these errors were encountered: