-
-
Notifications
You must be signed in to change notification settings - Fork 252
Add support for introduced and fixed commits in AdvisoryData #2017
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
Conversation
2af10cf to
a8ec9f1
Compare
|
@ziadhany add description in the PR please! |
|
@ziadhany mostly looks good! Please run the importer once and paste the logs here. Thanks! I want to see if we are missing on any data in OSV format. And how does the AdvisoryData and ImpactedPackages looks with the new CommitData. Thanks! |
|
@TG1999 This is the log output for the following importers:
the database query result : |
Why are we getting in this logs? The commit data should have been created for this |
|
See all when we have introduced and fixed events to create code commit data. |
|
I updated the script to handle unsupported packages (especially for OSS-Fuzz). CodeCommit is no longer ignored even if the package is unsupported, and logs are now more meaningful. This is the updated logs: the database query result : Issues related:
|
|
This log does not tell me a lot, what's the data. Why this is unsupported. |
|
One of the list might not be a valid version, but all others are valid, are we ingesting them or skipping whole list if we can't ingest one. |
@TG1999 We are ignoring GHSA files since we target only PYSEC files. |
Then add that to the log as well :) |
We are skipping this since the version range would likely be inconsistent if we processed it. I can changes this if needed. |
@keshav-space @pombredanne thoughts on this one ? |
|
For PYSEC data we would be using github version range, coz the versions are Semver. And if a version is not parsable that version should be skipped. Not the entire range. Also we should introduce a flag for advisories that were not completely parsed. So in future if our parsing techniques gets better we can delete the incomplete parsed advisory with a new one. |
keshav-space
left a comment
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.
Thanks @ziadhany, See the comments below and also make sure to adjust the insert_advisory method accordingly.
|
This is the log output for the following importers:
|
|
|
keshav-space
left a comment
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.
Thanks @ziadhany, LGTM!
|
@ziadhany LGTM! please rebase and adjust the migrations! great work 🙌 |
Signed-off-by: ziad hany <[email protected]>
Signed-off-by: ziad hany <[email protected]>
Fix patch_checksum constraint Remove unused imports Signed-off-by: ziad hany <[email protected]>
Signed-off-by: ziad hany <[email protected]>
Signed-off-by: ziad hany <[email protected]>
…PackageCommitPatch Signed-off-by: ziad hany <[email protected]>
Signed-off-by: ziad hany <[email protected]>
Update get_or_create_advisory_references to store the reference type correctly. Update get_or_create_advisory_package_commit_patches to correctly create or update the patch_text field. Signed-off-by: ziad hany <[email protected]>
Signed-off-by: ziad hany <[email protected]>
Signed-off-by: ziad hany <[email protected]>
Add constraint to make sure we have at least one field to create a valid Patch obj. Update patch_text only if patch_text field is empty. Return multiple objects for classify_patch_source function Add patch in AdviosryData.from_dict() Signed-off-by: ziad hany <[email protected]>
Signed-off-by: ziad hany <[email protected]>
Signed-off-by: ziad hany <[email protected]>
Signed-off-by: ziad hany <[email protected]>
Update migration file Signed-off-by: ziad hany <[email protected]>
747dc5f to
f7ee8c2
Compare
TG1999
left a comment
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!
introduced_by_commitsandfixed_by_commitsfields in our advisoryfrom_dictandto_dictmethodsCodePatchDataimporter class