Trivy marks all dependencies of subdirectories as 'dev dependency' for PNPM #7381
Closed
SemProvoost
started this conversation in
Bugs
Replies: 2 comments
-
@DmitriyLewen Can you please take a look? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Created #7386 for this bug |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Bug Summary: Trivy is incorrectly identifying subdirectory packages, which is listed as a dependency in the package.json of a subdirectory, as a dev-dependency.
Steps to reproduce
(Adding steps to reproduce here to allow myself of using markdown)
Project structure
/ (root directory)
├── package.json
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
└── subdir/
└── package.json
Root package.json content:
Subdir package.json content:
pnpm-workspace.yaml content:
pnpm-lock.yaml (as result of
pnpm i
on root)Running Trivy
Running Trivy on the root of the project (
trivy fs . -f json --include-dev-deps --list-all-pkgs
) results inAs you can see, the
sleep-utils
package is marked as"Dev": true,
while it is no dev-dependency.Desired Behavior
In my example, the
sleep-utils
package should not have been marked as dev-dependencyActual Behavior
In my example, the
sleep-utils
package has incorrectly been marked as dev-dependencyReproduction Steps
Target
None
Scanner
None
Output Format
JSON
Mode
None
Debug Output
Operating System
macOS Ventura 13.3.1
Version
Checklist
trivy clean --all
Beta Was this translation helpful? Give feedback.
All reactions