OpsLevel

Introduction to Snyk and OpsLevel Integration
OpsLevel allows you to define what operational maturity looks like for your organization. Within 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. With 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.

How it Works

Feature availability This integration relies on Snyk CLI. Find out more about the CLI.

Add a Snyk Integration

  1. 1.
    In the OpsLevel app, click Integrations in the left sidebar.
  2. 2.
    Click on 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
  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:
    1. 1.
      No Critical Vulnerabilities: Any service that has critical vulnerabilities in its package manifest file will fail this check.
    2. 2.
      No High Vulnerabilities: Any service that has high vulnerabilities in its package manifest file will fail this check.
    3. 3.
      Less than 3 Medium Vulnerabilities: Any service with 3 or more medium vulnerabilities in its package manifest will fail this check.
    4. 4.
      Less than 5 Low Vulnerabilities: Any service with 5 or more low vulnerabilities in its package manifest file will fail this check.
    5. 5.
      OpsLevel will populate 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 Snyk CLI and send the JSON output back to OpsLevel using the code below.
1
snyk test --prune-repeated-subdependencies --json |
2
curl -X POST http://app.opslevel.local:5000/integrations/custom_event/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
3
-H 'content-type: application/json' --data-binary @-
Copied!
This will send all the vulnerabilities for the service to OpsLevel where the check created in the previous section will be executed.
You will need to substitute the endpoint URL from the Snyk Integration you created in place of xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
Last modified 2d ago
Export as PDF
Copy link
Edit on GitHub
Contents
How it Works