There was an error while loading. Please reload this page.
1 parent 3328071 commit cc7fb37Copy full SHA for cc7fb37
1 file changed
lib/quayio/scanner/image.rb
@@ -3,6 +3,8 @@
3
module Quayio
4
module Scanner
5
class Image < Struct.new(:name, :quayio_token)
6
+ RELEVANT_SEVERITIES = %w(High Critical)
7
+
8
def vulnerable?
9
quayio? && image_exists? && scanned? && high_vulnerabilities_present?
10
end
@@ -24,7 +26,8 @@ def scanned?
24
26
def high_vulnerabilities_present?
25
27
raw_scan['data']['Layer']['Features'].detect do |f|
28
f['Vulnerabilities'] &&
- f['Vulnerabilities'].detect { |v| v['Severity'] == 'High' }
29
+ f['Vulnerabilities']
30
+ .detect { |v| RELEVANT_SEVERITIES.include?(v['Severity']) }
31
32
33
0 commit comments