Mark layers that Clair can't extract as failed

This commit is contained in:
Quentin Machu 2016-02-09 18:24:35 -05:00
parent e84d14af55
commit 1d2b31a581

View file

@ -107,8 +107,9 @@ class SecurityWorker(Worker):
# Handle any errors from the security scanner.
if httpResponse.status_code != 201:
if 'OS and/or package manager are not supported' in jsonResponse.get('Message', ''):
# The current engine could not index this layer
message = jsonResponse.get('Message', '')
if 'OS and/or package manager are not supported' in message or 'could not extract' in message:
# The current engine could not index this layer or we tried to index a manifest.
logger.warning('A warning event occurred when analyzing layer ID %s : %s',
request['ID'], jsonResponse['Message'])