# Ignore vulnerabilities using the Snyk CLI

{% hint style="info" %}
For [Snyk Open Source](/scan-with-snyk/snyk-open-source.md), these options work by default.

For [Snyk Container](/scan-with-snyk/snyk-container.md), these options also work, but after registering an ignore, when you call `snyk test` or `snyk monitor`, you must use the `--policy-path=` option, for example: `snyk container test node --policy-path=.snyk.`

For [Snyk Infrastructure as Code](/scan-with-snyk/snyk-iac/scan-your-iac-source-code.md), see [IaC ignores using the snyk policy file](/developer-tools/snyk-cli/scan-and-maintain-projects-using-the-cli/snyk-cli-for-iac/iac-ignores-using-the-.snyk-policy-file.md).

For [Snyk Code](/scan-with-snyk/snyk-code.md), see [Excluding directories and files from the Snyk Code CLI test](/developer-tools/snyk-cli/scan-and-maintain-projects-using-the-cli/snyk-cli-for-snyk-code/exclude-directories-and-files-from-snyk-code-cli-tests.md).
{% endhint %}

Sometimes, Snyk alerts you to a vulnerability that has no update or Snyk patch available, or that you do not believe to be currently exploitable in your application. When this happens you may want to tell Snyk to ignore the vulnerability for a certain period of time.

You can ignore a specific vulnerability in a project using the `snyk ignore` command.

`snyk ignore --id=<ISSUE_ID> [--expiry=<EXPIRY>] [--reason=<REASON>] [--policy-path=<PATH_TO_POLICY_FILE>] [<OPTIONS>]`

The `snyk ignore` command updates the `.snyk` file and supports the following options:

| **OPTION**                            | **DESCRIPTION**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | **DEFAULT** | **REQUIRED** |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- | ------------ |
| `--id`                                | <p>The Snyk ID for the issue to ignore. Found by running <code>snyk test</code> and grabbing the last segment of the URL for a given vulnerability.</p><p><strong>Example:</strong> For the vulnerability found at <a href="https://security.snyk.io/vuln/SNYK-DEBIAN10-NODETOUGHCOOKIE-5759362"><https://security.snyk.io/vuln/SNYK-DEBIAN10-NODETOUGHCOOKIE-5759362></a>, the Snyk ID is:</p><p><a href="https://security.snyk.io/vuln/SNYK-DEBIAN10-NODETOUGHCOOKIE-5759362">SNYK-DEBIAN10-NODETOUGHCOOKIE-5759362</a>.</p> | None        | Yes          |
| `--expiry`                            | <p>Expiry date in YYYY-MM-DD format (<a href="https://tools.ietf.org/html/rfc2822#page-14">RFC2822</a> and <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601</a> are supported).</p><p>Example: <code>--expiry=2017-04-30</code>.</p>                                                                                                                                                                                                                                                                  | 30 days     | No           |
| `--reason`                            | Human-readable \<REASON> to ignore this issue. Example: `reason='Not currently exploitable'`.                                                                                                                                                                                                                                                                                                                                                                                                                                  | None        | No           |
| `--policy-path=<PATH_TO_POLICY_FILE>` | Path to a .snyk policy file to pass manually.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | None        | No           |
| `--path`                              | Path to resource for which to ignore the issue. Example: `path='tough-cookie@2.15.8'`                                                                                                                                                                                                                                                                                                                                                                                                                                          | All         | No           |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.snyk.io/developer-tools/snyk-cli/scan-and-maintain-projects-using-the-cli/ignore-vulnerabilities-using-the-snyk-cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
