You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect AdvisoryV2 serialization due to missing PackageCommitPatch and Patch #2116
#2017 introduced Patch and PackageCommitPatch to AdvisoryV2, but these are not being reported when serializing AdvisoryV2 to AdvisoryData using AdvisoryV2.to_advisory_data().
patches field is missing from AdvisoryV2.to_advisory_data().
changed the title [-]Incorrect `AdvisoryV2` serialization due to missing `PackageCommitPatch` and `Patch`[/-][+]Incorrect AdvisoryV2 serialization due to missing PackageCommitPatch and Patch[/+]on Jan 19, 2026
Hi @keshav-space,
I’m new to the vulnerablecode codebase, so I started by reproducing this issue locally to understand the flow.
I confirmed:
1AdvisoryV2.to_advisory_data() does not include patches
2 ImpactedPackage.to_dict() does not include introduced/fixed commit patches
so i added
patches in to_advisory_data by aggregating patches through related ImpactedPackages
erialization of introduced_by_package_commit_patches and fixed_by_package_commit_patches in ImpactedPackage.to_dict()
I verified in Django shell that:
ip.to_dict() now shows commit patches
adv.to_advisory_data().patches returns them correctly
Since I’m new here, I’d appreciate feedback on whether this approach matches the project’s design expectations.
I might be missing some edge cases, so please guide me
Activity
[-]Incorrect `AdvisoryV2` serialization due to missing `PackageCommitPatch` and `Patch`[/-][+]Incorrect AdvisoryV2 serialization due to missing PackageCommitPatch and Patch[/+]iGufrankhan commentedon Jan 19, 2026
Hi @keshav-space,
I’m new to the vulnerablecode codebase, so I started by reproducing this issue locally to understand the flow.
I confirmed:
1AdvisoryV2.to_advisory_data() does not include patches
2 ImpactedPackage.to_dict() does not include introduced/fixed commit patches
so i added
patches in to_advisory_data by aggregating patches through related ImpactedPackages
erialization of introduced_by_package_commit_patches and fixed_by_package_commit_patches in ImpactedPackage.to_dict()
I verified in Django shell that:
ip.to_dict() now shows commit patches
adv.to_advisory_data().patches returns them correctly
Since I’m new here, I’d appreciate feedback on whether this approach matches the project’s design expectations.
I might be missing some edge cases, so please guide me
Include PackageCommitPatch and Patch in AdvisoryV2 serialization
keshav-space commentedon Jan 20, 2026
@iGufrankhan we have patch for this here #2117