anchore / syft

CLI tool and library for generating a Software Bill of Materials from container images and filesystems
Apache License 2.0
6.22k stars 574 forks source link

Duplicate package names #3317

Open AndriiY-SK opened 1 month ago

AndriiY-SK commented 1 month ago

What happened:

  1. How to prevent duplicate package names: jinja2 and Jinja2 ?
    image

  2. Maybe we can build a more human path instead of full with .venv/........ ?
    image

Because when we opened a vulnerability by specific dependency.
GitHub UI is building a path to a dependency that doesn't exist:
https://github.com/<ORG_NAME>/<REPO_NAME>/blob/-/.venv/lib/python3.9/site-packages/protobuf-3.19.4.dist-info/METADATA Maybe we can refer to package / repo that contains jinja ? package_name@jinja image

  1. Do we have a plan to add indirect dependencies for Github format ?

What you expected to happen:

  1. No duplicates
  2. More readable path like it Github does
    image

Steps to reproduce the issue: Github workflow

name: 'Push SPDX dependency graph'
on:
  push:
    branches:
      - master
  workflow_dispatch:

jobs:
  submit:
    permissions:
        actions: read
        contents: write

    runs-on: <RUNNER>
    steps:
      - uses: actions/checkout@v4

      - name: Set up Python 3.9
        uses: actions/setup-python@v3
        with:
          python-version: "3.9"

      - name: Install pip and pip-tools
        run: |
          pip install --upgrade pip
          python3 -m venv .venv

      - name: Install deps
        run: |
          source .venv/bin/activate
          pip install \
            -r pulumi_resources/environments/staging/requirements.txt \
            --extra-index-url="https://${user}:${pass}@<DOMAIN>/artifactory/api/pypi/PyPI-releaes/simple/" \
            --trusted-host artifactory.kenshoo-lab.com \
            --trusted-host pypi.org \
            --exists-action i

      - name: Install Syft
        run: |
          curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sudo sh -s -- -b /usr/local/bin

      - name: Run Syft
        uses: anchore/sbom-action@v0
        with:
            syft-version: v1.14.0
            path: ./
            dependency-snapshot: true

Anything else we need to know?:

Environment:

kzantow commented 2 weeks ago

A few observations: