Links

OpsLevel integration

Feature availability This integration relies on Snyk CLI. Find out more about the CLI.
OpsLevel integration allows you to define what operational maturity looks like for your Organization.
In OpsLevel, you can use Rubrics to create definitions for what a mature service looks like and evaluate your services to measure their adherence to your preferred best practices. Using OpsLevel Checks, you can verify your services meet the standards you care about.
With Snyk and OpsLevel, you can create checks for vulnerabilities in your services.

Add a Snyk Integration

  1. 1.
    In the OpsLevel app, click Integrations in the left sidebar.
  2. 2.
    Click the + New Integration button.
  3. 3.
    Click the Snyk tile to add the integration.
Create a Check
  1. 1.
    Navigate to the Rubrics sub-menu under the Service Health menu in OpsLevel
    Rubrics sub-ment
    Rubrics sub-ment
  2. 2.
    Create a Custom Event check.
  3. 3.
    Select the Snyk integration you created from the Integration dropdown
  4. 4.
    Choose one of the Check Templates from the dropdown.
    Consult the following list for information about each template:
    • No Critical Vulnerabilities: Any service that has critical vulnerabilities in its package manifest file will fail this check.
    • No High Vulnerabilities: Any service that has high vulnerabilities in its package manifest file will fail this check.
    • Less than 3 Medium Vulnerabilities: Any service with three or more medium vulnerabilities in its package manifest will fail this check.
    • Less than 5 Low Vulnerabilities: Any service with five or more low vulnerabilities in its package manifest file will fail this check.
    • OpsLevel will populate the Service Specifier field, which is used to determine what service to run the check for, and the Success Condition field, which is used to determine if the check should pass or fail. OpsLevel will also provide a sample payload to test the check.

Send payloads to OpsLevel using Snyk

Run your test command using the Snyk CLI and send the JSON output back to OpsLevel using the code below.
snyk test --prune-repeated-subdependencies --json |
curl -X POST http://app.opslevel.local:5000/integrations/custom_event/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
-H 'content-type: application/JSON --data-binary @-
This will send all the vulnerabilities for the service to OpsLevel, where the check created in the previous section will be executed.
In the webhook, you must substitute the endpoint URL from the Snyk Integration you created forxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
Webhook URL with endpoint from Snyk integration redacted