Skip to content

Commit

Permalink
feat(manager): introduce NA score CVEs as 0 in vuln/cves POST
Browse files Browse the repository at this point in the history
RHINENG-3260
  • Loading branch information
Tomáš Sasák authored and jdobes committed Nov 23, 2023
1 parent 87a1dd6 commit 5401490
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manager/vulnerabilities_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ class SimpleCvesListView(ListView):
def __init__(self, list_args, cve_list, uri):
cve_list = [remove_str_nulls(elem) for elem in cve_list]
query = (CveMetadata.select(CveMetadata.cve,
fn.COALESCE(CveMetadata.cvss3_score, CveMetadata.cvss2_score).alias("cvss_score"),
fn.COALESCE(CveMetadata.cvss3_score, CveMetadata.cvss2_score, 0).alias("cvss_score"),
CveImpact.name.alias("impact"))
.join(CveImpact, on=(CveMetadata.impact_id == CveImpact.id))
.where(CveMetadata.cve.in_(cve_list))
Expand Down

0 comments on commit 5401490

Please sign in to comment.