Skip to content
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

Filter out vulnerabilities reported by the MSRC API for non-Microsoft vulnerabilities #11

Open
wdormann opened this issue Jul 19, 2024 · 0 comments

Comments

@wdormann
Copy link

When the MSRC API is used to get vulnerabilities for a given month, it will return vulnerabilities for which there is an MSRC publication, as well as some stray vulnerabilities for which there are no MSRC publications. I noticed this when tweaking the script to save a copy of the MSRC publications in Archivebox:
Archivebox-2024-07-19-08-35-05

To fix this, patch-review.py should only consider vulnerabilities returned by the MSRC API that have titles. There might be a cleaner way to do this, but what I did was filter the all_vulns list with an additional line:

    all_vulns = release_json.get('Vulnerability', [])
    all_vulns = [vuln for vuln in all_vulns if vuln.get('Title', {'Value': 'Not Found'}).get('Value') is not None]
    len_vuln = len(all_vulns)

For the July 2024 MSRC publication, this corrects the count from 247 to 152.

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

No branches or pull requests

1 participant