Uploaded image for project: 'Project Quay'
  1. Project Quay
  2. PROJQUAY-7037

Can't get slack and email notification when package vulnerability found

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • quay-v3.11.0
    • quay
    • False
    • None
    • False
    • 0

      Description of problem:

      Set notifications by slack and email methods for 'package vulnerability found' event, but when package vulnerabilities are found, there is no notification received by slack and email.

      Version-Release number of selected component (if applicable):

      quay-operator-bundle-container-v3.11.1-10
      ------------------------------
      $ oc get $(oc get pod -l name=quay-operator-alm-owned -o name -n quay-enterprise) -o jsonpath='{.spec.containers[0].image}' -n quay-enterprise
      registry.redhat.io/quay/quay-operator-rhel8@sha256:a3a2171448b30385700e6f64633016abfb5dc331849a91cdc354405a32eb444c
      ------------------------------
      $ oc get $(oc get pod -l app=quay -o NAME -n quay-enterprise|head -n 1) -o jsonpath='{.spec.containers[0].image}' -n quay-enterprise
      registry.redhat.io/quay/quay-rhel8@sha256:969ae5e167b59ef6cbeb0366be1d1bd94850285094fc5e7d0ca6e25464d3b5b2
      ------------------------------
      

      How reproducible:

      1 Create email/quay/slack/webhook notifications for 'image push' and 'package vulnerability found' events

      The notification settings

      2 push a image with vulnerability

      3 check the notifications received by email/quay/slack/webhook

      The notification received by Red Hat Quay Notification

      The notification received by email 

      The notification received by slack 

      The push notification received by webhook

      The vulnerability notification received by webhook

      Actual results:

      For 'package vulnerability found' event, there is no notification received by slack and eamil.

      Expected results

      For 'package vulnerability found' event, there should be notification received by slack and eamil.

      Additional info:

      The same slack and email notification settings for 'image push' and  'package vulnerability found' events,  there are expected slack and email notifications for 'image push' event, but there is no slack and email notifications for 'package vulnerability found' event.  

      For 'Red Hat Quay Notification' and webhook notification methods, can receive notifications when hit 'package vulnerability found' event.  

      Got below error in quay logs

      22309 notificationworker stdout | 2024-04-22 04:12:33,887 [78] [ERROR] [workers.worker] Operation raised ex      ception
      22310 notificationworker stdout | Traceback (most recent call last):
      22311 notificationworker stdout |   File "/quay-registry/workers/worker.py", line 86, in _operation_func
      22312 notificationworker stdout |     return operation_func()
      22313 notificationworker stdout |   File "/quay-registry/workers/queueworker.py", line 134, in poll_queue
      22314 notificationworker stdout |     self.process_queue_item(job_details)
      22315 notificationworker stdout |   File "/quay-registry/workers/notificationworker/notificationworker.py",       line 45, in process_queue_item
      22316 notificationworker stdout |     raise exc
      22317 notificationworker stdout |   File "/quay-registry/workers/notificationworker/notificationworker.py",       line 41, in process_queue_item
      22318 notificationworker stdout |     method_handler.perform(notification, event_handler, job_details)
      22319 notificationworker stdout |   File "/quay-registry/notifications/notificationmethod.py", line 491, in       perform
      22320 notificationworker stdout |     summary = event_handler.get_summary(notification_data["event_data"],       notification_data)
      22321 notificationworker stdout |   File "/quay-registry/notifications/notificationevent.py", line 250, in       get_summary
      22322 notificationworker stdout |     len(event_data["tags"]),
      22323 notificationworker stdout | KeyError: 'tags' 

      The whole quay pod logs are attached in attachment. 

      There is a similar opening issue https://issues.redhat.com/browse/PROJQUAY-5681.

            Unassigned Unassigned
            rhwhu Weihua Hu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: