Skip to content

Conversation

@khorben
Copy link

@khorben khorben commented Apr 23, 2024

This is relevant to FreeBSD's ports, and possibly to any other project using the VuXML format in order to track vulnerabilities. (http://vuxml.freebsd.org)

The objective is to help FreeBSD offer security advisories in the OSV format, for ports first but possibly also for base components in the future. The corresponding ecosystem string (most likely FreeBSD) will be requested in a dedicated pull request.

Sponsored by: The FreeBSD Foundation

@khorben khorben marked this pull request as ready for review October 15, 2024 15:06
@andrewpollock
Copy link
Collaborator

Hi @khorben, this is exciting progress. I can review this from the OSV side of things, is there a VuXML SME who can review that side of things?

Also, if you look at tools/redhat for inspiration, having some test data to validate behaviour is also helpful.

@khorben
Copy link
Author

khorben commented May 2, 2025

Hi Andrew, sorry for the late answer. I suppose by SME you meant "Subject Matter Expert", in which case I think FreeBSD's ports-secteam@ (https://wiki.freebsd.org/PortsSecteam) might be the best point of contact.
I am looking into importing some test data for validation.

@khorben khorben force-pushed the khorben/vuxml branch 3 times, most recently from 4bd95a4 to 8614a9b Compare May 3, 2025 01:01
@andrewpollock
Copy link
Collaborator

Would you mind addressing the DCO check failure?

Copy link
Collaborator

@andrewpollock andrewpollock left a comment

Choose a reason for hiding this comment

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

I'm confused by the UBUNTU-CVE-2025-3454 test files?

I think it'll be a no-op change, but it'd be good to update the schema version in the test OSV records to the current version.

@khorben khorben force-pushed the khorben/vuxml branch 2 times, most recently from 3e0b468 to d3c580a Compare May 12, 2025 17:50
@khorben
Copy link
Author

khorben commented May 12, 2025

Would you mind addressing the DCO check failure?

Thanks for the heads up, I think this should be addressed now.

@khorben
Copy link
Author

khorben commented May 12, 2025

I'm confused by the UBUNTU-CVE-2025-3454 test files?

I have organised the test data as follows:

  • testdata/VUXML contains the original VUXML files, and their converted output into OSV's JSON
  • testdata/OSV is the other way around

Should I change or clarify anything in the commits?

@khorben khorben force-pushed the khorben/vuxml branch 2 times, most recently from 18503b2 to 44d9763 Compare May 12, 2025 21:39
@khorben
Copy link
Author

khorben commented May 12, 2025

I'm confused by the UBUNTU-CVE-2025-3454 test files?

Oh do you mean that you expected test files about FreeBSD?

First, IIRC VuXML is distribution-agnostic, and not tied to a specific ecosystem.
The FreeBSD project does not provide OSV files (yet); the objective is to allow the project to do so in the future; this is currently being investigated. OTOH, it can already be useful to import OSV data from other projects, and to publish it as VuXML fort the FreeBSD ports after review.

Likewise, it can be useful to convert VuXML data into OSV for the preparation work mentioned above. However, this still requires the corresponding ecosystem for FreeBSD, and choosing its exact name(s) might still be tricky: there is the base system, to distinguish from the third-party ports, and soon also from the packages for the base system.

I think it'll be a no-op change, but it'd be good to update the schema version in the test OSV records to the current version.

I have now updated the schema version in the output to OSV as 1.7.0.
I believe this is now as expected; let me know otherwise.

@illuusio
Copy link
Contributor

illuusio commented May 14, 2025

When turning off DTD validation then it works (dtd_validation=False) with: https://vuxml.freebsd.org/freebsd/vuln.xml

@illuusio
Copy link
Contributor

I would also add purl for packages when ecosystem have package manager it's nice addition to information

@illuusio
Copy link
Contributor

illuusio commented May 14, 2025

When Output directory is issued then (if I understand correctly) naming should something like: FBSD-2025-05-14.json or FBSD-VUID.json. My humble opinion is that they should be arranged by package name or yearly so there should not be so much in one dir.

@illuusio
Copy link
Contributor

It seems that <affects> is right next to <topic> in FreeBSD VuXML-file. It shouldn't affect anything but if parser is very bad then it does not work.

@@ -0,0 +1,271 @@
#!/usr/bin/env python
#
Copy link
Contributor

Choose a reason for hiding this comment

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

Just suggesting to have SPDX-header for license also

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for the suggestion, I have now added the SPDX headers.

Copy link
Contributor

Choose a reason for hiding this comment

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

SPDX header seems to be correct

Copy link
Collaborator

@oliverchang oliverchang left a comment

Choose a reason for hiding this comment

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

thank you very much for working on this, and for adding the tests! (and apologies for the delay in reviewing)

@@ -0,0 +1,42 @@
{
"schema_version": "1.7.0",
"id": "409206f6-25e6-11f0-9360-b42e991fc52e",
Copy link
Collaborator

Choose a reason for hiding this comment

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

this needs to have a FREEBSD- or some other prefix so it's clear it comes from the FreeBSD database.

Please also define the chosen prefix in https://ossf.github.io/osv-schema/#id-modified-fields

"affected": [
{
"package": {
"ecosystem": "FreeBSD:ports",
Copy link
Collaborator

Choose a reason for hiding this comment

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

In a separate PR, could you please add a ecosystem definition to https://ossf.github.io/osv-schema/#affectedpackage-field ?

Copy link
Author

Choose a reason for hiding this comment

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

Sorry about the late answer from my side as well. The choice of ecosystem definition is a bit complicated on FreeBSD, notably because of the distinction between the base system and the software packages. No decision has been made yet AFAIK, but I will bring it up again internally.

@andrewpollock
Copy link
Collaborator

@khorben I see some exciting progress with the latest release of the OSV Schema, and thought I'd check in on progress on this PR?

This is relevant to FreeBSD's ports.

Note that:

* There is no official ecosystem for FreeBSD ports yet
* A few elements of the VuXML DTD are not covered (e.g., \<uscertsa>,
  \<uscertta>)
* Cancelled VuXML events are not represented, for lack of information
  (withdrawal date...)
* Some versions do not match reality and need a correct increment
  (\<gt>)

Sponsored by:	The FreeBSD Foundation

Signed-off-by: Pierre Pronchery <[email protected]>
This is relevant to FreeBSD's ports.

Sponsored by:	The FreeBSD Foundation

Signed-off-by: Pierre Pronchery <[email protected]>
XXX this only happens when outputting to the standard output.

This is relevant to FreeBSD's ports.

Sponsored by:	The FreeBSD Foundation

Signed-off-by: Pierre Pronchery <[email protected]>
This is relevant to FreeBSD's ports.

Sponsored by:	The FreeBSD Foundation

Signed-off-by: Pierre Pronchery <[email protected]>
Sponsored by:	The FreeBSD Foundation

Signed-off-by: Pierre Pronchery <[email protected]>
@khorben khorben force-pushed the khorben/vuxml branch 3 times, most recently from 7986c4b to de0e650 Compare January 28, 2026 11:12
@khorben
Copy link
Author

khorben commented Jan 28, 2026

I just rebased the changes on top of the latest main branch, and imported further changes from @illuusio (from https://github.com/illuusio/freebsd-osv/blob/main/bin/convert_vuxml.py).
This should address some of the remaining issues.
Let us know if we need to make further improvements!

Sponsored by:	The FreeBSD Foundation

Signed-off-by: Pierre Pronchery <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants