Skip to content

Implement vuln ingestion hook exec step for slack notifications

What does this MR do and why?

Per #348467 (closed), Threat Insights accidentally broke slack notifications for the detection of new vulnerabilities during a large refactor of the vulnerability ingestion pipeline.

This MR adds a Hook Execution task to the end of the end of the ingestion pipeline to trigger any hooks where applicable. In this case the only applicable occasion to this is for any vulnerabilities which have been marked as "new_record" in their associated finding_map.

From there all existing integration should behave as originally expected.

Screenshots or screen recordings

Screenshot_from_2022-06-09_19-45-44

How to set up and validate locally

  1. Create new repository
  2. Navigate to settings -> integrations -> slack integration to enable a slack webhook integration on a slack workspace that supports it.
  3. Push code that is subject to security flaws to new repository. (https://gitlab.com/gitlab-examples/security/security-reports is a good candidate)
  4. Wait for CI to execute.
  5. Confirm that the slack messages for new vulnerabilities have been sent.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #348467 (closed)

Edited by Gregory Havenga

Merge request reports

Loading