Skip to content

Commit

Permalink
fix: effective severity attribute error (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
askmeegs authored Mar 25, 2021
1 parent ae00261 commit a55d170
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion container_registry/container_analysis/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 a55d170

Please sign in to comment.