MCPcopy Create free account
hub / github.com/aboutcode-org/vulnerablecode / get_fixed_packages

Method get_fixed_packages

vulnerabilities/api.py:323–339  ·  view source on GitHub ↗

Return a queryset of all packages that fix a vulnerability with same type, namespace, name, subpath and qualifiers of the `package`

(self, package)

Source from the content-addressed store, hash-verified

321 return normalize_qualifiers(package.qualifiers, encode=False)
322
323 def get_fixed_packages(self, package):
324 """
325 Return a queryset of all packages that fix a vulnerability with
326 same type, namespace, name, subpath and qualifiers of the `package`
327 """
328 return (
329 Package.objects.filter(
330 name=package.name,
331 namespace=package.namespace,
332 type=package.type,
333 qualifiers=package.qualifiers,
334 subpath=package.subpath,
335 fixingpackagerelatedvulnerability__isnull=False,
336 )
337 .with_is_vulnerable()
338 .distinct()
339 )
340
341 def get_vulnerabilities_for_a_package(self, package, fix) -> dict:
342 """

Callers 1

Calls 1

with_is_vulnerableMethod · 0.45

Tested by

no test coverage detected