Skip to content

Fix withdrawn advisory 2238#2239

Closed
shivamshrma09 wants to merge 4 commits intoaboutcode-org:mainfrom
shivamshrma09:fix-withdrawn-advisory-2238
Closed

Fix withdrawn advisory 2238#2239
shivamshrma09 wants to merge 4 commits intoaboutcode-org:mainfrom
shivamshrma09:fix-withdrawn-advisory-2238

Conversation

@shivamshrma09
Copy link
Copy Markdown

Summary

Fixes #2238

pkg:pypi/py@1.11.0 was shown as affected in GitHub and GitLab advisories even though the advisory GHSA-w596-4wvx-j9j6 was withdrawn.

Root Cause

parse_advisory_data_v3 in pipes/osv_v2.py had no withdrawn check, so withdrawn advisories were being imported by the v2 pipeline.

Changes

  • pipes/osv_v2.py: Added withdrawn check at the top of parse_advisory_data_v3, consistent with the existing check in parse_advisory_data (v1). This covers all 5 pipelines using this function: github_osv_importer, oss_fuzz, pypa_importer, pysec_importer, ubuntu_osv_importer.
  • importers/osv.py: Added withdrawn check in parse_advisory_data (v1).
  • importers/github_osv.py: Guard yield against None return.
  • tests/pipes/test_osv_v2.py: Added tests for withdrawn and non-withdrawn cases.
  • tests/test_osv.py: Added tests for withdrawn and non-withdrawn cases.

shivamshrma09 and others added 3 commits February 5, 2026 15:48
…lities

- packages: version_rank desc
- vulns: vulnerability_id desc
- advisories: advisory_id desc
Withdrawn advisories were being imported by the v2 pipeline because parse_advisory_data_v3 in pipes/osv_v2.py had no withdrawn check. This caused packages like pkg:pypi/py@1.11.0 to appear as affected even though the advisory (e.g. GHSA-w596-4wvx-j9j6) was withdrawn.

Add a withdrawn check at the top of parse_advisory_data_v3, consistent with the existing check in parse_advisory_data (v1). This fix covers all 5 pipelines that use parse_advisory_data_v3: github_osv_importer, oss_fuzz, pypa_importer, pysec_importer, ubuntu_osv_importer.

Add tests for both withdrawn and non-withdrawn cases in test_osv_v2.py.

Fixes aboutcode-org#2238

Signed-off-by: shivamshrma09 <shivamsharma27107@gmail.com>
@shivamshrma09 shivamshrma09 force-pushed the fix-withdrawn-advisory-2238 branch from d89d1c3 to 93a14a5 Compare March 28, 2026 06:19
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

Successfully merging this pull request may close these issues.

Withdrawn advisory should not affect any package

1 participant