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

Improve distro specification on PURLs #2243

Open
willmurphyscode opened this issue Oct 20, 2023 · 1 comment
Open

Improve distro specification on PURLs #2243

willmurphyscode opened this issue Oct 20, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@willmurphyscode
Copy link
Contributor

What would you like to be added:

Today, syft puts &distro=<distro info> on some PURLs. But there are instances where, for example, a version is missing.

Consider:

❯ syft -q -o json debian:trixie-20231009-slim | jq '.artifacts[0].purl'
"pkg:deb/debian/[email protected]?arch=arm64&distro=debian"

has no version info, but there is at least a codename in:

❯ syft -q -o json debian:trixie-20231009-slim | jq '.distro'
{
  "prettyName": "Debian GNU/Linux trixie/sid",
  "name": "Debian GNU/Linux",
  "id": "debian",
  "versionCodename": "trixie",
  "homeURL": "https://www.debian.org/",
  "supportURL": "https://www.debian.org/support",
  "bugReportURL": "https://bugs.debian.org/"
}

Whereas for amazonlinux 2023, for example, the version is already encoded in the PURL:

❯ syft -q -o json amazonlinux:2023.2.20231011.0 | jq '.artifacts[0].purl'
"pkg:rpm/amzn/[email protected]?arch=aarch64&upstream=chkconfig-1.15-2.amzn2023.0.2.src.rpm&distro=amzn-2023"

Why is this needed:

anchore/grype#86

Additional context:
Syft might need to do this by keeping a map of debian codenames to versions, and we should also see which other supported distros don't get version info in the PURLs.

@willmurphyscode willmurphyscode added the enhancement New feature or request label Oct 20, 2023
@willmurphyscode
Copy link
Contributor Author

Blocks anchore/grype#1530

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant