Skip to content

bug(pnpm): Trivy incorrect marks Dev packages #9263

@DmitriyLewen

Description

@DmitriyLewen

Description

Trivy non-deterministic marks Dev package for pnpm-lock.json files:

➜ trivy -q fs -f json --list-all-pkgs ./pnpm-lock.yaml --include-dev-deps | jq ' .Results[].Packages[] | select(.ID=="[email protected]")'
{
  "ID": "[email protected]",
  "Name": "unrs-resolver",
  "Identifier": {
    "PURL": "pkg:npm/[email protected]",
    "UID": "cf90da27ce156ff"
  },
  "Version": "1.9.2",
  "Dev": true,
  "Indirect": true,
  "Relationship": "indirect",
...
}
➜ trivy -q fs -f json --list-all-pkgs ./pnpm-lock.yaml --include-dev-deps | jq ' .Results[].Packages[] | select(.ID=="[email protected]")'
{
  "ID": "[email protected]",
  "Name": "unrs-resolver",
  "Identifier": {
    "PURL": "pkg:npm/[email protected]",
    "UID": "5b2d4bd73247bc76"
  },
  "Version": "1.9.2",
  "Indirect": true,
  "Relationship": "indirect",
...
}

Discussed in #9247

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions