Skip to content

Commit

Permalink
Holding value on memory.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasks committed Jan 9, 2021
1 parent 73586e5 commit cc20b41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions safety/safety.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,16 @@ def check(packages, key, db_mirror, cached, ignore_ids, proxy):
if cve_id:
cve_id = cve_id.split(",")[0].strip()
if vuln_id and vuln_id not in ignore_ids:
cve_meta = db_full.get("$meta", {}).get("cve", {}).get(cve_id, {})
vulnerable.append(
Vulnerability(
name=name,
spec=specifier,
version=pkg.version,
advisory=data.get("advisory"),
vuln_id=vuln_id,
cvssv2=db_full.get("$meta", {}).get("cve", {}).get(cve_id, {}).get("cvssv2", None),
cvssv3=db_full.get("$meta", {}).get("cve", {}).get(cve_id, {}).get("cvssv3", None)
cvssv2=cve_meta.get("cvssv2", None),
cvssv3=cve_meta.get("cvssv3", None)
)
)
return vulnerable
Expand Down

0 comments on commit cc20b41

Please sign in to comment.