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.
Repositories with highest rate of PRs with failed PR checks - analyze how often Snyk is surfacing new issues in PRs and how internal teams are interacting with these results.
PR checks by status over time - analyze trends in PR check outcomes over time.
Repository PR check adoption - track your repository PR check coverage and surface gaps.
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:

Repositories with highest rate of PRs with failed PR checks
Business value
Understanding how internal teams are interacting with these PR checks helps AppSec teams assess the effectiveness of any shift-left strategy. Surfacing these patterns at the repository level enables targeted conversations with engineering teams to improve overall security posture. A high rate of failed PR checks may indicate emerging risk areas or configurations that need tuning.
A high rate of overridden checks may signal that developers are bypassing security gates, which warrants investigation into whether the overrides are justified or represent a policy gap.
Example query
The query below returns the total number of pull requests, the count of PRs with at least one failed check, the count of PRs with at least one overridden check, the % of PRs with failed checks, and the % of PRs with overridden checks per target repository.
The results are based on PR checks executed in the last 4 months and filtered to only include monitored and non-deleted projects.
You can also adapt this query to prioritize surfacing repositories that have a high rate of overridden checks.
Output format:

PR checks by status over time
Business value
Tracking the volume of PR checks by their outcome over time can provide visibility into the overall health and trajectory of any shift-left strategy. By monitoring weekly trends in successful, failed, and errored checks, AppSec teams can detect and investigate spikes in failures and identify product configurations that need attention from error trends. An increasing success rate over time can demonstrate that developers are producing more secure code earlier in your software development life cycle.
Example query
The query below returns weekly counts of PR check groups by if the status was success, failure, or error. The aggregation is done on the pr check group id and using the pr check group state.
The results are based on PR check groups created in the last 6 months and filtered to only include monitored and non-deleted projects.
Output format:


Repository PR check adoption
Business value
Ensuring PR checks are enabled across your repositories is critical to preventing new security risks from reaching your production environments. Tracking PR check adoption at the repository level helps AppSec teams identify and tackle coverage gaps. Comparing current adoption against a previous period surfaces whether coverage is improving or regressing over time.
Example query
The query below returns PR check enablement status per repository for the current 30-day period vs. the preceding 30-day period for both Snyk Code and Snyk Open Source.
PR check enablement is resolved by combining project-level and integration-level settings. Project-level settings overrides take priority when they exist. Otherwise the integration settings apply. A repository is considered covered if at least one organization importing it has PR Checks enabled for all projects associated with that product type for at least one integration.
Results will be N/A when a repository is new to Snyk or if the specific Snyk product does not apply.
Output format:

Last updated
Was this helpful?

