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

Mageia vulnerabilities available in OSV #2089

Open
dfandrich opened this issue Apr 6, 2024 · 16 comments
Open

Mageia vulnerabilities available in OSV #2089

dfandrich opened this issue Apr 6, 2024 · 16 comments
Labels
datasource Requests for new data sources enhancement New feature or request

Comments

@dfandrich
Copy link

The Mageia distribution now exports its vulnerability reports in OSV format. Here are some key URLs:

Source URL: https://advisories.mageia.org/<ID>.html
OSV Formatted URL: https://advisories.mageia.org/<ID>.json
Index of vulnerabilities: https://advisories.mageia.org/vulns.json
Mageia security advisories home: https://advisories.mageia.org/

We're using a PURL format analogous to the Fedora one. The index format is compatible with the one used by Go, except that the advisory modification time is not currently easily accessible in our infrastructure so it's left off.

I'm not sure what the most relevant link is for "How to contribute", but our Bugzilla instance is at https://bugs.mageia.org/ and we have a wiki page on ways to contribute to the distribution at https://wiki.mageia.org/en/Contributing.

@dfandrich dfandrich added the enhancement New feature or request label Apr 6, 2024
@oliverchang oliverchang added the datasource Requests for new data sources label Apr 8, 2024
@oliverchang
Copy link
Collaborator

Thanks @dfandrich ! https://advisories.mageia.org/vulns.json doesn't seem to work at the moment. Is this expected to be live soon?

Also, would you be able to contribute an OSV schema definition here: https://ossf.github.io/osv-schema/#affectedpackage-field to define the ecosystem/package naming rules?

@dfandrich
Copy link
Author

I think you checked that URL during the time our servers were down due to a cooling issue in the datacentre. I can create a PR on the schema definition.

@dfandrich
Copy link
Author

I've created ossf/osv-schema#235

dfandrich added a commit to dfandrich/osv.dev that referenced this issue Apr 12, 2024
No other source seems to use the style of index Mageia has (not even Go,
which is was derived from), so this probably isn't useful as-is without
code changes.
@dfandrich
Copy link
Author

I've also created #2107 on source_test.yaml. That one probably isn't useful right now without changes to the code, but it's a starting point for discussion. All but two sources (that return all advisories in a single giant file) seem to use a cloud storage directory API to retrieve a list. Mageia currently has a REST endpoint to get a list of IDs, then each desired one must be retrieved in turn.

@andrewpollock
Copy link
Contributor

Leaving some notes here for future reference:

Comparing with the two existing REST sources:

which emit an array of all the vulnerabilities.

@dfandrich how difficult would it be to stand up another endpoint that in essence

@andrewpollock andrewpollock changed the title Mageia vulnerabilities availabe in OSV Mageia vulnerabilities available in OSV Apr 15, 2024
@dfandrich
Copy link
Author

dfandrich commented Apr 15, 2024 via email

@oliverchang
Copy link
Collaborator

An index is totally fine for the main vulnerability JSON, and is supported per https://google.github.io/osv.dev/rest-api-contribution/#1-a-url-pointing-to-a-rest-endpoint-containing-at-least-all-of-the-vulnerabilities-ids-and-date-modified.

The only change we'd like to see is the addition of modified in https://advisories.mageia.org/vulns.json -- would this be feasible?

@dfandrich
Copy link
Author

dfandrich commented Apr 15, 2024 via email

@oliverchang
Copy link
Collaborator

It is indeed necessary for our import process to work. Would you be able to add it?

@dfandrich
Copy link
Author

dfandrich commented Apr 16, 2024 via email

@andrewpollock
Copy link
Contributor

I didn't spot that page documenting the index file before.

Hi @dfandrich if you have any feedback on our documentation or on your user journey navigating it, I'm all ears. Our new data source onboarding process is very bumpy, manual and bespoke right now, and while I don't foresee OSV.dev's data sources growing at the same rate or to the same scale as the CVE Program's CNA's, that could also be famous last words...

So, good quality, easily navigable documentation (and a soon to be created checklist with concrete examples) are the only way to smoothly scale here :-)

@dfandrich
Copy link
Author

My main source of confusion about the process is that the information I needed was spread out about several web sites & repositories and it was hard to find all the information I needed. I couldn't find the specification on the JSON index format until it was pointed out to me, and the same with the source.yaml file (and I still haven't found documentation on that one). It also seemed a bit odd to me that the OSV schema specification includes information about the data sources themselves, although I suppose the prefixes do fit. Even now, it's not completely clear to me the scope of https://osv.dev/ and how that web site and API fits in to the whole OSV "ecosystem" if you want to use that term.

@andrewpollock
Copy link
Contributor

Hi @dfandrich the new home database onboarding process is far from streamlined (for the home database or for us). If you're up for giving me a bit of a brain dump while things are still fresh in your mind, I'm all ears. My goal is to produce a checklist with real world example PRs to crib from, at a minimum.

@dfandrich
Copy link
Author

dfandrich commented Apr 23, 2024 via email

@andrewpollock
Copy link
Contributor

What time zone are you in? It's probably going to be best to talk through your experiences interactively.

@dfandrich
Copy link
Author

dfandrich commented Apr 27, 2024 via email

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

No branches or pull requests

3 participants