Build your first dashboard
This guide provides example queries to build out your first AppSec dashboard, based on key performance indicators (KPIs) and relevant use cases. These are organized by use case and explained in terms of business value and implementation considerations. While the provided queries offer a starting point, Snyk encourages you to customize them to suit your specific requirements.
See queries for the following use cases:
Open issues backlog - reveal current AppSec risk that requires attention.
Aging - track the exposure window of open issues.
Mean Time To Resolve (MTTR) - analyze the remediation velocity of engineering teams.
Service Level Agreement (SLA) - verify that issue remediation meets with your compliance requirements.
IDE & CLI test rates - measure the developer adoption of AppSec testing in the development stage.
CI/CD Pipelines test rates - measure the adoption of AppSec testing in CI/CD pipelines.
You must update the database and schema names in the example queries provided before execution.
Open issues backlog
Business value
AppSec teams need to understand the current exposure to risk. To do so, various aspects of the existing issues backlog are examined:
The number of open issues.
The number of high or critical-severity open issues.
If there are available fixes for open issues.
For greater context, those figures are broken down into engineering teams, applications or any meaningful business structure that will make the results more concise and actionable. The following example queries allow this examination.
Example query - SCA
This query returns open SCA issues backlog counters, distributed by fixability and grouped by Snyk Organization.
The results are based on:
Open high or critical issues that were found by Snyk Open Source (SCA)
Noise cancelling:
Only issues of monitored projects
No deleted issues
Output format:
Example query - Code
This query returns open Snyk Code issues backlog counters, distributed by severity and grouped by Snyk Organization.
The results are based on:
Open issues that were found by Snyk Code
Noise cancelling:
Only issues of monitored projects
No deleted issues
Output format:
Aging
Business value
Issue aging refers to the time elapsed between an issue’s introduction and the current date. Organizations are concerned about this metric as the exploitation likelihood increases as the exposure window extends.
To mitigate this risk, AppSec teams monitor a predefined SLA criteria, which specifies when an issue has exceeded the expected remediation timeframe.
When an issue was reintroduced, the aging is counted based on the last introduction date.
Example query
The query below returns the average aging (in days) of critical issues per Snyk organization. The results are based on:
Open critical issues
Noise cancelling:
Only issues of monitored projects
No deleted issues
Output format:
MTTR
Business value
The MTTR (Mean Time to Resolve) metric tracks the average time it takes to resolve a security issue. It is calculated based on issues that have already been resolved and is measured over a predefined period (typically monthly, quarterly, or annually) according to their last resolution date.
Analyzing the MTTR results provides insight into the the remediation velocity of engineering teams. However, it is important to always measure both MTTR and Aging, as issues that remain open for long periods won’t show up in the MTTR results until they are remediated.
Example query
The query below returns last month’s MTTR results per issue severity per Snyk organization. The results are based on:
Issues that were resolved in the last month
Noise cancelling:
Only issues of monitored projects
No deleted issues
Output format:
SLA
Business value
Remediating vulnerabilities is a crucial practice, however it slows down product development that drives companies' business. Due to this simple fact, engineering teams may neglect open vulnerabilities in favor of product development tasks.
Establishing a service-level agreement (SLA) for vulnerability remediation helps maintaining that fine balance and ensure that while moving forward with product development, evolving security risks are being addressed according to a clear and transparent policy.
SLA targets define the acceptable exposure window for a vulnerability based on factors such as severity, business criticality of the asset, code ownership, or other risk factors.
Snyk issues data enables AppSec teams to track issue aging and identify which vulnerabilities have exceeded SLA targets.
Example query
The query below returns counters of open issues per SLA status (within SLA, at risk, breached) broken down into issue severities.
The results are based on:
Open issues
Noise cancelling:
Only issues of monitored projects
No deleted issues
The example query can be extended to support various SLA use-cases, such as defining different SLA targets per Snyk orgs or groups, drilling-down into the at-risk or breached issues and prioritize their remediation or analyzing the SLA status for different business units.
Output format:
Developers IDE & CLI test usage and adoption
Business value
This section demonstrate how you can discover the adoption of Snyk IDE & CLI tests by your developers. Implementing AppSec testing during the development phase is regarded as one of the most cost-effective methods for preventing new security risks from reaching production. It is more efficient because developers are already in the right context to address issues before the code progresses further in the SDLC. Detecting issues in later stages requires developers to switch context and revisit the problem, which can be less efficient and more time-consuming.
Example query
The query below returns the unique developers and total number of scans per environment and Snyk Product.
The results are based on:
Tests executed
Excluding tests that were performed during CI/CD stage
Output format:
CI/CD pipelines test usage and adoption
Business value
Preventing vulnerabilities from reaching production involves placing security gates throughout the software development lifecycle (SDLC). One of the most common gates is within the CI/CD pipeline, ensuring that any vulnerabilities missed in earlier stages are caught and blocked during the build process.
Leveraging Snyk Data Share enables you to assess the current adoption of tests and security gates within your CI/CD pipelines.
Example query
The query below returns the number of tested repositories, total tests, and the test % success rate per Snyk Product.
The results are based on tests executed in the CI/CD stage in the last 3 months.
Output format:
Last updated