Skip to content
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

bug(os): apline removed packages don't have UID #7886

Closed
DmitriyLewen opened this issue Nov 7, 2024 Discussed in #7877 · 0 comments · Fixed by #7887
Closed

bug(os): apline removed packages don't have UID #7886

DmitriyLewen opened this issue Nov 7, 2024 Discussed in #7877 · 0 comments · Fixed by #7887
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@DmitriyLewen
Copy link
Contributor

Description

Apline removed packages (--removed-pkgs flag) don't have UID:

➜ trivy -q image -f json --list-all-pkgs node:22.11-alpine --removed-pkgs | grep zstd-libs -A 5
          "Name": "zstd-libs",
          "Identifier": {},
          "Version": "1.5.6-r0",
          "Layer": {}
        }
      ],

For this reason we build incorrect dependency graph for SBOM formats:

    {
      "ref": "e51ad365-e7ee-4887-b9c4-ac9a4be4ab11", // OS component
      "dependsOn": [
        "7699e9b4-a6b9-4a75-a2d5-5aad7eecea98", // one of removed pkgs
        "7699e9b4-a6b9-4a75-a2d5-5aad7eecea98",
       ...
        "pkg:apk/alpine/[email protected]?arch=x86_64&distro=3.20.3", // alpine pkgs
        "pkg:apk/alpine/[email protected]?arch=x86_64&distro=3.20.3",

Discussed in #7877

@DmitriyLewen DmitriyLewen added the kind/bug Categorizes issue or PR as related to a bug. label Nov 7, 2024
@DmitriyLewen DmitriyLewen added this to the v0.58.0 milestone Nov 7, 2024
@DmitriyLewen DmitriyLewen self-assigned this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant