Intercept Security Scans with Vulnerability Webhooks
Security scanning provides an opportunity to target, track, and trace vulnerabilities introduced to your packages as soon as Cloudsmith has received a complete package upload. However what happens when you want to intercept the results of a scan immediately. An early warning can make a difference when distributing vulnerable packages to hundreds, thousands, or even millions of developers, devices, or systems globally.
Previously you could have rolled a custom solution using our API and polled it across your entire organization, dozens of repositories, and numerous packages; however, you don't even need to put in that kind of effort!
This is where vulnerability webhooks come to the rescue!
Anytime a scan is completed, Cloudsmith will dispatch a corresponding vulnerability webhook to your source. A webhook event will identify a scanned package and a summary of the vulnerabilities found within the package. As a sanity check, this helps determine which completed images have vulnerabilities and the severity of those vulnerabilities. If you are unfamiliar with everything that webhooks are useful for, check out our earlier post on Repository Webhooks: Notifications for DevOps.
Good news, everybody! If you already have a webhook set up and you are using "Send All Events" for your Event Subscription, you are already receiving "Package Security Scan Completed" events when a security scan completes. Simples! However, if you are using an event subscription with selected individual events, it's simple to add the "Package Security Scan Completed". Once updated, your webhook will start receiving these events.
If you have never set up a webhook, you can check our comprehensive docs on how to create, configure, and test a webhook. Once configured, you can upload a new package that supports security scanning or rerun an existing security scan using "On-Demand Scanning", and when it completes the following event will be sent to your configured endpoint: