For the complete documentation index, see llms.txt. This page is also available as Markdown.

Ignore issues

How to ignore vulnerabilities and license issues in Snyk

Snyk is rolling out a new navigation. The steps on this page describe the classic interface. If your view looks different, visit Navigate the Snyk Web UI to map these options to the new interface.

Ignore issues

You can ignore a vulnerability or open-source license issue if you do not need to fix it and want to avoid seeing the issue in scan results. You can ignore issues temporarily or permanently and set ignores individually or as actions. By using Snyk ignores you can display results only for issues you need to fix

For Open Source details, see How to set ignores. This information provides a useful background for using ignores with other Snyk scanning methods. For more information, see the following sections on this page:

Decisions to ignore issues

Optimally, it allows you to fix or patch vulnerabilities or remove vulnerable dependencies. However, you may want to suppress an issue for any of the following reasons:

  • There is no fix.

  • The issue is not relevant to the Project. One example is a distributed denial-of-service (DDoS) attack for an internal service.

It is optimal to fix an issue even if it has a path that makes it non-exploitable. A vulnerability that is not exploitable now may become exploitable in the future.

How to set ignores

You can view and ignore issues in several ways:

Ignore issues in the Snyk Web UI

Each issue card has an Ignore button that opens a dialog where you can select how or why you want to ignore the issue and how long to ignore it.

Ignore dialog from issue card
Ignore dialog from issue card

You can select Not vulnerable for any issue that is not exploitable at the time you create the ignore.

If you select Ignore temporarily, then you can check the Until fix is available checkbox:

Ignore temporarily
Ignore temporarily

This is checked by default if no fix is available for the issue. The vulnerability resurfaces as soon as Snyk has a fix for it, and optionally you can provide additional details on why you are ignoring the issue.

An issue is ignored until either of these conditions occurs: the ignore period expires, or the vulnerability becomes fixable.

An issue ignored in an Open Source or Code Project in the Snyk web UI will be reflected and not flagged in any subsequent PR checks across all branches of the Project.

When you ignore an issue in the Snyk Web UI, the issue shows who ignored it and allows you to edit the ignore or unignore the issue.

Ignore set in the Snyk Web UI
Ignore set in the Snyk Web UI

For more information, see the training: Ignoring issues.

Ignore issues in the CLI

You can suppress issues through the CLI by using the snyk ignore command, for example:

snyk ignore --id='npm:braces:20180219' --expiry='2018-04-01' --reason='testing'

For more information, see the ignore command help and Ignore vulnerabilities using Snyk CLI.

When you use snyk ignore for Open Source, the .snyk policy file is updated with the path and reason given if one was provided. An example follows:

For more information, see Use the .snyk file to ignore issues.

Scan from the CLI or CI/CD, ignore in the Web UI

Ignores for Open Source issues found in a CLI or CI/CD run are synchronized with the Web UI as follows:

  1. You scan a Project and push the results to the Web UI using snyk monitor.

  2. You see the results of the scan in the Web UI and choose to ignore an issue.

  3. The issue is ignored when you run snyk test or snyk monitor in the CI/CD or CLI.

Refer to the following example. Issues are identified as CI/CLI, meaning the Project was imported from snyk monitor. The issue is npmconf. It is Not vulnerable, and the user can select Ignore.

The following shows snyk test results before an ignore is set in the Web UI.

Snyk test results before ignoring in the Web UI
Snyk test results before ignoring in the Web UI

The following shows snyk test results after an ignore is set in the Web UI:

Snyk test results after ignoring in the Web UI
Snyk test results after ignoring in the Web UI

The same repository imported from the SCM is considered to be a different Project, and any ignore set for an SCM Project does not impact the results of snyk test from the CLI or a CI/CD. SCM and CI Projects behave as two standalone Projects.

Use the .snyk file to ignore issues

You can use the .snyk file to ignore Snyk Open Source, Snyk Container, and Snyk IaC issues. You cannot use it to ignore Snyk Code findings; see Ignore issues in Snyk Code.

For Open Source Projects, you can ignore the vulnerability by creating a .snyk YAML file or modifying the existing .snyk file.

A .snyk file
A .snyk file

For example, if you want to ignore the vulnerability with SNYK ID SNYK-RUBY-FASTREADER-20085 in fastreader, with the reason “No fix available” until 01 Jan 2024, you would write the following:

For more information, see The .snyk file, including the section about .snyk files in monorepos and .snyk files in different directories from manifest files.

Use policy actions to ignore issues

You can set Security policy actions to ignore all vulnerabilities that match the conditions specified in a policy rule.

For more information, see Security policies.

Ignore issues in Snyk Code

How to ignore a Snyk Code finding

To ignore a Snyk Code finding, use one of the following methods:

Method
When to use it

Snyk Web UI

Ignore a single finding from its issue card. For details, see Ignore issues in the Snyk Web UI.

snyk ignore create

Ignore a finding from the command line. This command is an Early Access feature of the Ignore Approval Workflow. For details, visit Ignore create.

Snyk Code Security policies

Ignore findings in bulk across a Group, matching on CWE, Snyk Code rule ID, or severity. Available to Enterprise customers only; it must be enabled by Snyk before it is accessible. For details, see Manage ignores at the Group level through Snyk Code Security policies.

With Consistent Ignores for Snyk Code, these ignores apply everywhere Snyk Code runs: the Snyk Web UI, the CLI, the IDE, and pull request checks. Ignores created with snyk ignore create apply only to CLI and IDE test runs; they do not apply to SCM (stateful) tests run through the Import API, and they do not support CLI Upload projects. A policy scoped by Project attributes does not apply in the CLI or IDE when no Snyk Project is available. To find the Snyk Code rule ID to use in a policy, run snyk code test --sarif.

View ignored Snyk Code findings

With Consistent Ignores for Snyk Code enabled and the correct Organization selected, the CLI hides ignored findings by default. To display them, run snyk code test --include-ignores. The ignore metadata is available in the suppressions module of the SARIF output. For details, see Consistent Ignores for Snyk Code CLI.

How Snyk Code matches ignored findings

For Snyk Code, the ignore functionality may capture a wider range of issues than other products.

Snyk Code transforms the input code into an intermediate representation, which captures the flow of code but abstracts away some details.

Snyk Code uses this intermediate representation to recognize the same issue even when you refactor your code or rename a variable.

Thus when you ignore an issue, Snyk Code can also ignore that issue if it occurs in multiple places in your code, even with minor code changes. This avoids generating multiple duplicate reports for pieces of code with the same ignored issue.

As an example, the following two code snippets, denote the same issue, as the developer only renamed the variables:

Ignore issues in Snyk Container

When you scan container images using snyk container test, you can ignore issues that are not relevant to you by setting an ignore in The .snyk file.

Snyk recommends storing and versioning the .snyk file in the root of your working directory.

After you set an ignore, when you use the snyk container test or snyk container monitor command, you must use the --policy-path= option. An example follows:

snyk container test node --policy-path=.snyk.

Ignore issues in Snyk IaC

When scanning your IaC configuration files using snyk iac test, you can ignore issues that are not relevant to you by using The .snyk file.

Snyk recommends storing and versioning the .snyk file in the root of your working directory, where you store your IaC configuration files.

For more information, see IaC ignores using the .snyk policy file.

Configure ignore settings

Suppressing vulnerabilities carries a level of risk, so you can make this function available to admins only as follows:

  1. Navigate to your Organization Settings > General > Ignores.

  2. Under Ignore an issue or edit ignore settings using Snyk Web UI or Snyk API, select Group and Org Admin users (Default user roles only). This also prevents ignores from being added through the CLI.

  3. Under Require reason for each ignore, you can set to Required to enter a reason for each ignore.

  4. Select Update to make the changes.

Update ignore settings
Update ignore settings

Enterprise customers can generate a report showing only open, ignored issues.

Last updated

Was this helpful?