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

fix: effective_severity attribute error #104

Merged
merged 1 commit into from
Mar 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]