-
Notifications
You must be signed in to change notification settings - Fork 188
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
Always return the upstream aliases when no alias groups are generated #2374
Comments
✨ Thank you for your interest in OSV.dev's data quality! ✨ Please review our FAQ entry on how to most efficiently have this addressed. |
So this is caused by our AliasGroup computation finding there were too many transitive aliases, likely because the GO entry refers to (CVE-2024-6104), and I see a large number of chain guard advisories also refer to CVE-2024-6104, so deciding to skip generating the alias group. There are 2 separate issues here:
|
@cpanato are you the right person to review the Chainguard records being published? Refer to https://ossf.github.io/osv-schema/#aliases-field and https://ossf.github.io/osv-schema/#related-field |
can be, what is the issue, i did not understand that, do you have an example? |
In a nutshell, https://ossf.github.io/osv-schema/#aliases-field
https://ossf.github.io/osv-schema/#related-field
(any feedback on how to make this aspect of the schema documentation more comprehensible is very welcome) It sounds like there are many Chainguard advisories aliased to CVE-2024-6104, which tends to indicate something is wrong:
|
I see, i think I got it, I will update to move that to related field. thank you for the feedback cc @luhring |
I'd be cool with making the change in the Chainguard OSV data. We'd also want to give other consumers of the data a heads up if we do, but that wouldn't delay the change by more than a week or so. I've read the docs for Chainguard's advisories each describe the impact of one vulnerability in a specific distro package that we ship. These distro packages are downstream of the upstream components for which the vulnerabilities are originally reported. So the vulnerability itself (i.e. the specific software weakness) is the same, and any fixes upstream are inherited in these downstream distro packages. But the two software artifacts are distinct from one another. I think I'm getting confused around these two sentences from the
^ makes me lean toward "this isn't an alias". While it's true that our advisories don't describe multiple upstream vulnerabilities, patches to the vulnerability downstream in the distro package build process don't benefit the upstream project. But...
^ makes me lean back toward "well, maybe this is an alias?", because it actually allows for there to be distinct packages in distinct ecosystems, which was my only hesitation in satisfying the first constraint. The examples given for the docs of the
^ This doesn't seem to apply here.
^ Our OSV entries aren't bundling multiple distinct vulnerabilities, like other distro advisory systems sometimes do. However, each vulnerability in a language ecosystem (e.g. GHSA-, GO-, etc.) is "1:many" with Chainguard's advisories, in the case when a given upstream component is used in multiple downstream distro packages.
^ This is helpful, but only once we clearly understand the definition of aliases. We defer to the OSV maintainers on how Chainguard should be using the OSV format, of course! I'm just looking to make sure I can follow along intuitively. |
I think Chainguard might be on a bit of an edge case with our The primary purpose of the Since we can't realistically expect all our data sources to know and list the correct IDs from every other data source, OSV computes the complete set of aliases by transitively combining sets of aliases from each ingested record. This becomes problematic if misused, since unrelated vulnerabilities can become lumped together by transitive chains of aliases. #888 might provide some background. For Chainguard, CGA-23mp-53xj-rxq8, CGA-2gpx-j9wf-x7gf, and about 30 others all consider themselves aliases of CVE-2024-6104. This makes OSV treat all of them as aliases of each other as well, which is probably not intentional. From what I can tell, these are listed as aliases because the artifacts are all built with the vulnerable Go package. While this might be considered as ambiguously correct, it doesn't produce a desirable alias grouping and therefore should not be done. The
Admittedly, I'm not entirely sure what the schema's intent was for this line. I think it's there to allow aliases across ecosystems in the same way a single OSV record can contain multiple different ecosystems, but it is also a bit unclear to me. Hopefully this helps to clear up why we want it this way. Sorry this comment became a bit of an essay 😅 |
Thanks, this is incredibly helpful, @michaelkedar! 🙏 Here's my proposal for next steps:
Please let me know how this sounds to you! 😃 |
See google/osv.dev#2374 for motivation. Signed-off-by: Dan Luhring <[email protected]>
Please do, high quality documentation is immensely helpful with scaling. If it isn't easily comprehensible to you, it's very likely to be to other unfamiliar readers. Your contributions are very welcome. I'll fork out your third point as an issue on the OSV-Schema so it doesn't get lost. |
Hi @Moullisha thanks for flagging this, and sorry for the tangential noise with Chainguard record issues. |
now we moved to use the related field: https://packages.cgr.dev/chainguard/osv/CGA-23mp-53xj-rxq8.json thanks @luhring |
Coming out of google/osv.dev#2374 (comment), wanted to suggest some potential wording improvements to help the next Linux distro that comes along better understand how the `aliases` field should and should not be used. I welcome any feedback, and I'm not sure I've captured the sentiment perfectly. One particular callout: this PR removes an existing sentence (below) that we struggled to wrap our heads around. If there's something that this was trying to convey that's lost in my PR, I'd love to better understand it. >Aliases may be used for vulnerabilities affecting different packages or ecosystems as long as they follow this definition. cc: @michaelkedar @andrewpollock @cpanato --------- Signed-off-by: Dan Luhring <[email protected]>
This issue has not had any activity for 60 days and will be automatically closed in two weeks See https://github.com/google/osv.dev/blob/master/CONTRIBUTING.md for how to contribute a PR if you're interested in helping out. |
Describe the bug
Some vulnerabilities in OSV do not mention alias whereas the source link has alias data.
To Reproduce
https://vuln.go.dev/ID/GO-2024-2947.json mentions two aliases whereas https://api.osv.dev/v1/vulns/GO-2024-2947 does not.
Similar behaviour observed in case of GO-2024-2918, GHSA-v6v8-xj6m-xwqh, GO-2024-2963
Expected behaviour
If alias is available in source data, same should be provided by OSV.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: