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

Add cpe identifiers to OS products #2525

Merged
merged 2 commits into from
Feb 18, 2023

Conversation

noqcks
Copy link
Contributor

@noqcks noqcks commented Feb 16, 2023

After the discussion in purl-spec around adding an os candidate type was rejected, I went to thinking about what identifiers we could use to match OS releases.

@captn3m0 mentioned using CPEs in Integrate with the SBOM Ecosystem #763

Steve Springett mentioned using the PURL swid type in this comment

I think that endoflife.date could support both. But the only thing to note about the swid type in the purl spec is that the qualifier tag_id is NOT optional. This is the only qualifier I'm aware of that's not optional. I think that because of this, matching on swid would be much more difficult than matching on CPEs, if we wanted to remain compliant with purl-spec (probably should).

So, in order to find some kind of path forward, I added this PR, which adds cpes 2.2 and 2.3 for different operating systems. Most of these CPEs I grabbed from syft.

The identifier I added is like - cpe: <cpe2.2> or - cpe: <cpe2.3> but we could also namespace according to cpe version in the key such as - cpe22 or - cpe23, looking for your feedback.

Signed-off-by: Benji Visser <benji@093b.org>
Signed-off-by: Benji Visser <benji@093b.org>
@captn3m0
Copy link
Member

This is great!

There's a few collections of os-release files on the internet that might be helpful. https://github.com/chef/os_release is one, and I think @woodruffw also maintains a better one somewhere - i can't find a link to it right now.

Another one here: https://gist.github.com/natefoo/814c5bf936922dad97ff

Copy link
Member

@captn3m0 captn3m0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging this in favor of multiple small PRs for this effort to avoid one-large-PR which might face conflicts.

@captn3m0 captn3m0 merged commit 66f2b34 into endoflife-date:master Feb 18, 2023
@woodruffw
Copy link

There's a few collections of os-release files on the internet that might be helpful. https://github.com/chef/os_release is one, and I think @woodruffw also maintains a better one somewhere - i can't find a link to it right now.

It's possible, but I don't actually remember maintaining one 😅

@noqcks
Copy link
Contributor Author

noqcks commented Feb 20, 2023

I believe I found the collection of os-release files you were looking for @captn3m0 https://github.com/nexB/container-inspector/tree/main/tests/data/distro/os-release

@marcwrobel marcwrobel added the product-updates Product content updates that are not fixes nor releases updates label Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product-updates Product content updates that are not fixes nor releases updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants