From 1d2b31a5818e1d3620ce0dc3fd9963f23a25f067 Mon Sep 17 00:00:00 2001 From: Quentin Machu Date: Tue, 9 Feb 2016 18:24:35 -0500 Subject: [PATCH] Mark layers that Clair can't extract as failed --- workers/securityworker.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/workers/securityworker.py b/workers/securityworker.py index 8b427783e..4313f1496 100644 --- a/workers/securityworker.py +++ b/workers/securityworker.py @@ -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'])