Use a feature flag to toggle security notifications
This commit is contained in:
parent
bfcb1add48
commit
888f976e8d
3 changed files with 6 additions and 3 deletions
|
@ -1,6 +1,8 @@
|
|||
import logging
|
||||
import logging.config
|
||||
|
||||
import features
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
from endpoints.notificationhelper import spawn_notification
|
||||
|
@ -90,7 +92,7 @@ class LayerAnalyzer(object):
|
|||
|
||||
# If we are the one who've done the job successfully first, get the vulnerabilities and
|
||||
# send notifications to the repos that have a tag on that layer.
|
||||
if set_status:
|
||||
if features.SECURITY_NOTIFICATIONS and set_status:
|
||||
# Get the tags of the layer we analyzed.
|
||||
repository_map = defaultdict(list)
|
||||
event = ExternalNotificationEvent.get(name='vulnerability_found')
|
||||
|
|
Reference in a new issue