From 580bd650bb13c5baba8c61221b9a80796651f2ea Mon Sep 17 00:00:00 2001 From: askmeegs Date: Thu, 25 Mar 2021 10:24:20 -0400 Subject: [PATCH] fix: effective severity attribute error --- samples/snippets/samples.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/samples.py b/samples/snippets/samples.py index 48d193b..ecf28c4 100644 --- a/samples/snippets/samples.py +++ b/samples/snippets/samples.py @@ -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]