Closed nikpivkin closed 8 months ago
@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 fsevents
remove the node-pre-gyp
dependency, which is what contributed the minimist@0.0.8
entry with "dev": true
in my example. You can force the older version by adding this override in package.json before installing gulp
:
"overrides": {
"gulp": {
"fsevents": "1.2.9"
}
}
Or, probably simpler, change the instructions to npm install -D fsevents@1.2.9
instead of gulp
.
@ngraef Good catch, I fixed it
Repost from https://github.com/aquasecurity/trivy/discussions/5134#discussioncomment-6930978
This patch in
aquasecurity/go-dep-parser
fixes my use case:diff --git a/pkg/nodejs/npm/parse.go b/pkg/nodejs/npm/parse.go --- a/pkg/nodejs/npm/parse.go +++ b/pkg/nodejs/npm/parse.go @@ -116,6 +117,7 @@ // There are cases when similar libraries use same dependencies // we need to add location for each these dependencies if savedLib, ok := libs[pkgID]; ok { + savedLib.Dev = savedLib.Dev && pkg.Dev savedLib.Locations = append(savedLib.Locations, location) sort.Sort(savedLib.Locations) libs[pkgID] = savedLib
I'm not sure what other implications that has or whether the same issue exists in parsers for other package managers.
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! Created #6356 for this task.
Discussed in https://github.com/aquasecurity/trivy/discussions/5134