Snyk Integration Capabilities with WebHooks - some examples
- 3 minutes read - 528 wordsTL;DR
Integrate your Snyk application security platform by leveraging webhooks into various other external systems such as Microsoft Teams, Azure DevOps Boards, New Relic, DataDog and Splunk.
Here are all the necessary links to get started:
- GitHub Repository: https://github.com/harrykimpel/snyk-webhook-subscription
- Microsoft Teams: https://github.com/harrykimpel/snyk-webhook-subscription/blob/main/azure-function-microsoft-teams.cs
- Azure DevOps Boards: https://github.com/harrykimpel/snyk-webhook-subscription/blob/main/azure-function-azure-boards.cs
- New Relic: https://github.com/harrykimpel/snyk-webhook-subscription/blob/main/azure-function-newrelic.cs
- DataDog: https://github.com/harrykimpel/snyk-webhook-subscription/blob/main/azure-function-datadog.cs
- Splunk: https://github.com/harrykimpel/snyk-webhook-subscription/blob/main/azure-function-splunk.cs
Background
In the past few weeks I have been quite busy in my spare time to think about new ways of integrating the Snyk application security platform with various other systems and especially also observability platforms. These ideas are typically triggered through customer interactions, their questions or requirements. Due to my nature and passion, I typically don’t just think about potential integrations and architectures, but really can’t help but also implement a quick prototype. That is what I am passionate about.
In contrast to the previous post I shared on leveraging Prometheus exporters, this webhook is basically a different option to choose from when it comes to potential integrations.
The Collection
The repository contains some examples on how to subscribe to Snyk notifications and process the information in order to forward these notifications to other systems and platforms. The examples currently consist of Microsoft Teams and Azure DevOps Boards, but also focus heavily on observability platforms such as New Relic, DataDog and Splunk.
All of these examples make use of Snyk webhooks in order to get triggered if new security vulnerabilities or issues are found in all of the projects tied to a specific Snyk organization. Please refer to the Snyk docs page for further information about Snyk Webhooks and the related Snyk webhook API.
Please also note that the webhooks feature is currently in beta. While in this status, Snyk may change the API and the structure of webhook payloads at any time, without notice.
How to get Started
Steps you need to follow in order to set-up these integrations:
-
Create an Azure Function App in order to receive the webhook from Snyk
-
Deploy one of the example implementations for the target system of your choice The examples are all written in C# in order to process the payload from Snyk and send it to the target system. These Azure Functions typically require some environment variables to be set-up.
-
Create the Snyk Webhook providing the link from the Azure Function URL
-
Receive notifications for new vulnerabilities in the target system. This could be message cards for Microsoft Teams or work items in Azure DevOps Boards. For the observability tools, you will need to visualize the reveived events in the forms of custom dashboards or correlations with other forms of monitoring data.
I provided sample Azure Functions for:
- Microsoft Teams: https://github.com/harrykimpel/snyk-webhook-subscription/blob/main/azure-function-microsoft-teams.cs
- Azure DevOps Boards: https://github.com/harrykimpel/snyk-webhook-subscription/blob/main/azure-function-azure-boards.cs
- New Relic: https://github.com/harrykimpel/snyk-webhook-subscription/blob/main/azure-function-newrelic.cs
- DataDog: https://github.com/harrykimpel/snyk-webhook-subscription/blob/main/azure-function-datadog.cs
- Splunk: https://github.com/harrykimpel/snyk-webhook-subscription/blob/main/azure-function-splunk.cs
The End Result
Based on the notifications settings in your Snyk account, you will then be notified of new issues in your target system. The final result could look somehow similar to the example screenshots provided below.
Azure DevOps Boards
Microsoft Teams
New Relic
DataDog
Splunk
Related Links/References
- Snyk Webhook docs: https://docs.snyk.io/snyk-api-info/snyk-webhooks
- Snyk API docs: https://snyk.docs.apiary.io/#reference/webhooks
- GitHub Repository: https://github.com/harrykimpel/snyk-webhook-subscription
- Microsoft Teams: https://github.com/harrykimpel/snyk-webhook-subscription/blob/main/azure-function-microsoft-teams.cs
- Azure DevOps Boards: https://github.com/harrykimpel/snyk-webhook-subscription/blob/main/azure-function-azure-boards.cs
- New Relic: https://github.com/harrykimpel/snyk-webhook-subscription/blob/main/azure-function-newrelic.cs
- DataDog: https://github.com/harrykimpel/snyk-webhook-subscription/blob/main/azure-function-datadog.cs
- Splunk: https://github.com/harrykimpel/snyk-webhook-subscription/blob/main/azure-function-splunk.cs
- snyk
- new relic
- microsoft
- datadog
- splunk
- webhooks
- vulnerabilities
- security
- application security
- DevSecOps