Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
Fix effective severity attribute error
Browse files Browse the repository at this point in the history
  • Loading branch information
askmeegs committed Mar 25, 2021
1 parent ce14e53 commit 96ad03e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/snippets/samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def find_high_severity_vulnerabilities_for_image(resource_url, project_id):
vulnerabilities = grafeas_client.list_occurrences(parent=project_name, filter=filter_str)
filtered_list = []
for v in vulnerabilities:
if v.effective_severity == Severity.HIGH or v.effective_severity == Severity.CRITICAL:
if v.vulnerability.effective_severity == Severity.HIGH or v.vulnerability.effective_severity == Severity.CRITICAL:
filtered_list.append(v)
return filtered_list
# [END containeranalysis_filter_vulnerability_occurrences]

0 comments on commit 96ad03e

Please sign in to comment.