Skip to content

Commit d041a2b

Browse files
committed
Ignore wildcard versions in gentoo and remove redundant docstring
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
1 parent 663f43e commit d041a2b

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

vulnerabilities/helpers.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,6 @@ def requests_with_5xx_retry(max_retries=5, backoff_factor=0.5):
124124
def nearest_patched_package(
125125
vulnerable_packages: List[PackageURL], resolved_packages: List[PackageURL]
126126
) -> List[AffectedPackage]:
127-
"""
128-
Parameters:
129-
:vulnerable_packages(list)
130-
:resolved_packages(list)
131-
"""
132-
133127
class PackageURLWithVersionComparator:
134128
"""
135129
This class is used to get around bisect module's lack of supplying custom

vulnerabilities/importers/gentoo.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,11 @@ def cves_from_reference(reference):
105105
def affected_and_safe_purls(affected_elem):
106106
safe_purls = set()
107107
affected_purls = set()
108-
108+
skip_versions = {"1.3*", "7.3*", "7.4*"}
109109
for pkg in affected_elem:
110110
for info in pkg:
111+
if info.text in skip_versions:
112+
continue
111113
pkg_ns, pkg_name, = pkg.attrib[
112114
"name"
113115
].split("/")

0 commit comments

Comments
 (0)