Merge pull request #1219 from coreos-inc/securityworker-manifest

Mark layers that Clair can't extract as failed
This commit is contained in:
Jimmy Zelinskie 2016-02-09 18:28:44 -05:00
commit 4ae18cf249

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'])