-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
Shared vulnerability format for vulnerabilities #471
Comments
Hi @oliverchang! Thanks for reaching out.
Yup, we'd be interested, especially if it means a reduction in duplicate work that is occurring today with so many different databases with different formats.
I've quickly added some comments. Will re-read it sometime soon and add more comments as needed.
We're not tied to our current format (it has plenty of things I would like to improve/change), so if there's a generally-accepted standard, we're happy to transition. Though, we do have tooling that uses our format, so would need to figure out how to keep both formats for a while during the transition stage. @postmodern any thoughts here? |
First off, thank you for reaching out to our little project.
This database is primarily concerned with advisories affecting RubyGems and Ruby implementations. I did not see any examples of a RubyGem or Ruby advisory in the document, so I cannot give specific feedback. Based on the examples that I did see, the metadata does contain affected semver-version ranges which we could convert to RubyGems style version ranges;
Considering that bundler-audit uses the current YAML schema, we must be careful about changing the schema. Also, while JSON is machine readable, it is not exactly human readable/writable, especially for data containing multi-paragraph text blocks. Where as plain YAML excels at representing multi-paragraph text blocks in a human readable/writable manner. I am also hesitant about rushing to adopt or become dependent on a new format that might not become That said, the Google OSV team is more than welcome to help contribute back to ruby-advisory-db, by either submitting advisories or code contributions to help integrate the two advisory schemas. |
Thank you very much for the feedback! I added an example of a RubyGems advisory into the document. Re changing the schema format, we're not necessarily asking everybody to use this format as the source of truth, only that databases export this JSON format so people can easily build ecosystem-agnostic tooling to consume vulnerabilities in all open source package ecosystems. Regarding the format spec being widely adopted, the Go vulnerability database, Rust vulnerability database are committed to exporting this format, and we've very close to helping the Python community launch its own vulnerability database. We also have a DB of vulns found by our OSS-Fuzz service. We're hoping to finalise this as a V1 spec very soon after gathering more feedback. That said, using this schema as the source of truth (as an alternate YAML encoding for easy hand-editing as you mention) has its benefits wrt common tooling for database maintainance. For Python, we've built out a workflow to minimize human triage and auto-generate entries in this format from other feeds such as NVD. This could be generalized to Ruby if this is something might help. More generally, the OSV team is certainly very happy to help contribute changes here to help integrate this schema and with advisory generation as well. Thanks! |
Hi, just following up again here! Would you be open to supporting this format as an export of the current ruby DB? We'd be happy to help with the implementation of this, as well as collaborating to find ways to make discovering new advisories easier (as we've done for Python). Perhaps there are other ways we could help fund the existing maintenance effort too -- happy to discuss more over email. We also just released a blog post with some more background info: https://security.googleblog.com/2021/06/announcing-unified-vulnerability-schema.html |
I see one major hurdle based on the conversation in the JSON Schema Google doc: listing the impacted versions. The ruby-advisory-db uses RubyGem's version constraint syntax (ex: While I am not 100% clear about the requirements of how to export the ruby-advisory-db, I suspect it could be done via GitHub Actions and a rake task. Perhaps a rake task(s) could be defined to convert every YAML advisory into the JSON Schema equivalent, commit the files, and push to an alternate branch which could be As far as funding, I will let the other @rubysec/core members chime in on how that could be handled. I think funding the work of advisory curation is the most sustainable option, as it is thankless and tiresome work that never stops. While we have setup automated tasks to sync the DB against GHSA, as well as linting checks and schema validation tests, some degree of human verification is still necessary as the vulnerability information is sometimes incomplete or inaccurate. |
@oliverchang @postmodern just wanted to follow up on this because we're looking into adopting @postmodern your comment about the one major hurdle you saw being the versions seems to predate when the specification got support for "events" which I think means converting the advisories here into an OSV format might be very doable now since e.g.
and for the latest
|
@oliverchang This was brought up to be in Vegas last week during a discussion about dependency management. We'd love to accept Google's assistance in modernizing this database and making it so there's not so much manual work. What would be good next steps for this? |
Thanks for getting back! What form of assistance are you looking for? Some potential ways we could help here:
|
Hi folks! Resurrecting an old thread here to see if there's still interest? The OSV schema is currently being exported by many different ecosystems and DBs: https://github.com/ossf/osv-schema/blob/main/README.md. It would be amazing if we could add Ruby to this list. |
@oliverchang Either of the proposed options is fine. We're not tied to the current schema, and it actually causes headaches when we try to import things from other databases. The current team is just too busy to do this transition ourselves, but we're happy to help others where we can. |
@reedloden bundler-audit, which is used by many in CI, relies on the current schema. Changing it in the @oliverchang if you just want a mechanism to export the |
Hi!
I work on the Google Open Source Vulnerabilities project, and we've been working with the Go security team and other vulnerability database maintainers to try to arrive at a common JSON-based format for describing basic metadata about vulnerabilities and links between them. The goal is to make it easier for language teams to publish vulnerabilities in a machine-readable format and to make it easier for security researchers and other cross-language projects to analyze and correlate that vulnerability information.
To that end, @rsc and I have prepared a doc describing a proposed format which can be found at https://tinyurl.com/vuln-json. Feedback is most welcome, preferably as comments on the doc.
The specific questions we are trying to answer right now are:
Thanks very much for any and all feedback!
The text was updated successfully, but these errors were encountered: