Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
  • Loading branch information
TG1999 committed Jan 9, 2023
1 parent 3926c83 commit 0cb6dd3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions vulnerabilities/importers/mozilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ def get_advisories_from_yml(mfsa_id, lines) -> List[AdvisoryData]:
for cve, advisory in data["advisories"].items():
# These may contain HTML tags
summary = BeautifulSoup(advisory.get("description", ""), features="lxml").get_text()
alias = is_cve(cve)
if alias:
if is_cve(cve):
yield AdvisoryData(
summary=summary,
aliases=[cve],
Expand Down Expand Up @@ -141,8 +140,7 @@ def get_affected_packages(pkgs: List[str]) -> List[PackageURL]:
if not pkg:
continue
# pkg is of the form "Firefox ESR 1.21" or "Thunderbird 2.21"
version = pkg.rsplit(None, 1)[1]
name = pkg.rsplit(None, 1)[0]
name, _, version = pkg.rpartition(" ")
if version and name:
try:
# count no of "." in version
Expand Down

0 comments on commit 0cb6dd3

Please sign in to comment.