Skip to content

Support for concurrent package registry requests when using --enrich #5193

Description

@winwinashwin

What would you like to be added:

Support for making package registry requests concurrently when using --enrich.

At the moment, enrichment requests appear to be made synchronously/sequentially. I verified this by running Syft with verbose logging:

SYFT_CACHE_DIR=/tmp/syft-cache syft file:pnpm-lock.yaml \
  --select-catalogers npm \
  --enrich javascript \
  -o spdx-json=pnpm.sbom.json \
  -vvvv

It would be useful if Syft could perform registry lookups in parallel, ideally with a configurable concurrency limit to avoid overwhelming package registries or hitting rate limits.

Why is this needed:

For large lockfiles, synchronous enrichment makes SBOM generation very slow.

In my case, pnpm-lock.yaml contained more than 1,500 packages, and the command above took approximately 10 minutes to complete.

Most of the elapsed time appears to be spent waiting for package registry responses. Since these lookups are largely independent of one another, running a bounded number of requests concurrently could significantly reduce overall SBOM generation time.

Additional Context:

Syft version: 1.51.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions