-
Notifications
You must be signed in to change notification settings - Fork 198
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
Fix pysec importer #739
Fix pysec importer #739
Conversation
vulnerabilities/importers/pysec.py
Outdated
@@ -73,14 +74,22 @@ def parse_advisory_data(raw_data: dict) -> Optional[AdvisoryData]: | |||
raw_id = raw_data["id"] | |||
summary = raw_data.get("summary") or "" | |||
aliases = get_aliases(raw_data) | |||
aliases.append(raw_id) |
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 think there is no need for (append and dedupe) raw_id (id field)
is unique in osv .
https://ossf.github.io/osv-schema/#id-modified-fields
and aliases field
is a list of IDs of the same vulnerability in other databases
https://ossf.github.io/osv-schema/#aliases-field
and we append raw_id
in aliases
using get_aliases
.
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.
Alright! But I don't think we need get_aliases
here, it can be handled inline
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
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.
LGTM. Thanks!
Rename helpers.py to utils.py Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel tushar.goel.dav@gmail.com