Skip to content

Commit 6de1484

Browse files
committed
Address review comments
Signed-off-by: Tushar Goel <[email protected]>
1 parent 3926c83 commit 6de1484

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Release notes
22
=============
33

44

5-
Version v32.0.0
5+
Next release
66
----------------
77

88
- We re-enabled support for the mozilla vulnerabilities advisories importer.

vulnerabilities/importers/mozilla.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ def get_advisories_from_yml(mfsa_id, lines) -> List[AdvisoryData]:
8383
for cve, advisory in data["advisories"].items():
8484
# These may contain HTML tags
8585
summary = BeautifulSoup(advisory.get("description", ""), features="lxml").get_text()
86-
alias = is_cve(cve)
87-
if alias:
86+
if is_cve(cve):
8887
yield AdvisoryData(
8988
summary=summary,
9089
aliases=[cve],
@@ -141,8 +140,7 @@ def get_affected_packages(pkgs: List[str]) -> List[PackageURL]:
141140
if not pkg:
142141
continue
143142
# pkg is of the form "Firefox ESR 1.21" or "Thunderbird 2.21"
144-
version = pkg.rsplit(None, 1)[1]
145-
name = pkg.rsplit(None, 1)[0]
143+
name, _, version = pkg.rpartition(" ")
146144
if version and name:
147145
try:
148146
# count no of "." in version

0 commit comments

Comments
 (0)