You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. git clone https://github.com/john-d8r/trivy-test-pnpm-local.git
2. cd trivy-test-pnpm-local
3. trivy fs . -f json -o report.json --list-all-pkgs
4. notice the target `pnpm-lock.yaml` has two entries with no package name (local packages)
5. while`package-lock.json` target displays the local packages as expected
Target
Filesystem
Scanner
Vulnerability
Output Format
JSON
Mode
Standalone
Debug Output
2024-02-01T08:07:27.767+0530 DEBUG Severities: ["UNKNOWN""LOW""MEDIUM""HIGH""CRITICAL"]
2024-02-01T08:07:27.768+0530 DEBUG Ignore statuses {"statuses": null}
2024-02-01T08:07:27.778+0530 DEBUG cache dir: /home/john/.cache/trivy
2024-02-01T08:07:27.778+0530 DEBUG DB update was skipped because the local DB is the latest
2024-02-01T08:07:27.778+0530 DEBUG DB Schema: 2, UpdatedAt: 2024-02-01 00:17:06.315344565 +0000 UTC, NextUpdate: 2024-02-01 06:17:06.315344285 +0000 UTC, DownloadedAt: 2024-02-01 02:14:58.381178952 +0000 UTC
2024-02-01T08:07:27.778+0530 INFO Vulnerability scanning is enabled
2024-02-01T08:07:27.778+0530 DEBUG Vulnerability type: [os library]
2024-02-01T08:07:27.778+0530 INFO Secret scanning is enabled
2024-02-01T08:07:27.778+0530 INFO If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-02-01T08:07:27.778+0530 INFO Please see also https://aquasecurity.github.io/trivy/v0.48/docs/scanner/secret/#recommendation for faster secret detection
2024-02-01T08:07:27.778+0530 DEBUG Enabling misconfiguration scanners: [azure-arm cloudformation dockerfile helm kubernetes terraform terraformplan]
2024-02-01T08:07:27.778+0530 DEBUG No secret config detected: trivy-secret.yaml
2024-02-01T08:07:27.778+0530 DEBUG The nuget packages directory couldn't be found. License search disabled2024-02-01T08:07:27.778+0530 DEBUG Walk the file tree rooted at '.' in parallel2024-02-01T08:07:27.779+0530 DEBUG Skip "" package. "" doesn't match semver: invalid semantic version
2024-02-01T08:07:27.779+0530 DEBUG Skip "" package. "" doesn't match semver: invalid semantic version2024-02-01T08:07:27.783+0530 INFO To collect the license information of packages in "package-a/package-lock.json", "npm install" needs to be performed beforehand2024-02-01T08:07:27.785+0530 DEBUG OS is not detected.2024-02-01T08:07:27.785+0530 DEBUG Detected OS: unknown2024-02-01T08:07:27.785+0530 INFO Number of language-specific files: 42024-02-01T08:07:27.785+0530 INFO Detecting npm vulnerabilities...2024-02-01T08:07:27.785+0530 DEBUG Detecting library vulnerabilities, type: npm, path: package-a/package-lock.json2024-02-01T08:07:27.785+0530 DEBUG Detecting library vulnerabilities, type: npm, path: package-b/package-lock.json2024-02-01T08:07:27.785+0530 DEBUG Detecting library vulnerabilities, type: npm, path: package-lock.json2024-02-01T08:07:27.785+0530 INFO Detecting pnpm vulnerabilities...2024-02-01T08:07:27.785+0530 DEBUG Detecting library vulnerabilities, type: pnpm, path: pnpm-lock.yaml
Operating System
Ubuntu
Version
Version: 0.48.3
Vulnerability DB:
Version: 2
UpdatedAt: 2024-02-01 00:17:06.315344565 +0000 UTC
NextUpdate: 2024-02-01 06:17:06.315344285 +0000 UTC
DownloadedAt: 2024-02-01 02:14:58.381178952 +0000 UTC
Discussed in #6030
Originally posted by john-d8r February 1, 2024
Description
When using local package (https://docs.npmjs.com/cli/v10/configuring-npm/package-json#local-paths) with pnpm (
pnpm-lock.yaml
), trivy is unable to detect the package names for them. Meanwhile for npm (package.json
) it works fineDesired Behavior
Trivy to populate package names for the local packages same as what's been reported for npm (
package.lock.json
)Actual Behavior
Reproduction Steps
Target
Filesystem
Scanner
Vulnerability
Output Format
JSON
Mode
Standalone
Debug Output
Operating System
Ubuntu
Version
Checklist
trivy image --reset
The text was updated successfully, but these errors were encountered: