From 8a539c4bc14d02b51e91a105760b6d973a843e3b Mon Sep 17 00:00:00 2001 From: Quentin Machu Date: Mon, 30 Nov 2015 13:43:51 -0500 Subject: [PATCH] Fix security notification perform condition As defined in util/secscan/api.py, Critical < High < Medium < Low < Negligible < Unknown. We have to send the notification if the expected level is higher than the vulnerability level, not the opposite. --- endpoints/notificationevent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/endpoints/notificationevent.py b/endpoints/notificationevent.py index 365b815d3..b0b58f44e 100644 --- a/endpoints/notificationevent.py +++ b/endpoints/notificationevent.py @@ -125,7 +125,7 @@ class VulnerabilityFoundEvent(NotificationEvent): expected_level_index = event_config['level'] priority = PRIORITY_LEVELS[event_data['vulnerability']['priority']] actual_level_index = priority['index'] - return expected_level_index <= actual_level_index + return actual_level_index <= expected_level_index def get_summary(self, event_data, notification_data): msg = '%s vulnerability detected in repository %s in tags %s'