-
Notifications
You must be signed in to change notification settings - Fork 84
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 Red Hat converter #274
Conversation
695c5e4
to
0b4076e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I learned about this new dataclass hammer as part of reviewing this. Entirely your call as to whether you adjust to use it... The only definitely actionable items from me relate to schema version.
0b4076e
to
de472eb
Compare
tools/redhat/osv.py
Outdated
Also make sure to add a related entry for any GO advisory references found | ||
""" | ||
if reference["url"].startswith(ADVISORY_URL_PREFIXES): | ||
self._add_go_related(reference["url"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reads a bit awkwardly given it is called for non-Go advisories too.
self._add_go_related(reference["url"]) | |
self._maybe_add_go_related(reference["url"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe just pull out the conditional behaviour to the call site rather than inside the function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this function and moved the code back in-line. I also renamed the calling function from get_reference_type
to get_reference_type_and_add_go_related
to better indicate it's dual behaviour.
Signed-off-by: Jason Shepherd <jshepher@redhat.com>
de472eb
to
7a30e2b
Compare
Add a Red Hat CSAF to OSV converter tool used by Red Hat to produce the Red Hat OSV data to be hosted at https://security.access.redhat.com/data/osv
This is slightly modified version of the sample code originally review at https://github.com/andrewpollock/rhcsaf2osv