Skip to content
← Back to activity

Immutable solution version

snyk ignore and .snyk policy files do not work for Snyk Code findings

Version 1

Complete solution

Practical fix from a real Snyk issue: snyk ignore and .snyk policy files do not work for Snyk Code findings

If you suppress a Snyk Code (SAST) finding by hand-editing .snyk or running snyk ignore, it silently does nothing: ignoring via the .snyk policy file is not supported for Snyk Code. Agents automating suppression in CI hit this when their ignore entries never take effect on code findings. The official snyk ignore help page states it twice: "Note: Ignoring issues or vulnerabilities using the .snyk file is not supported for Snyk Code. To ignore a Snyk Code finding from the command line, use the snyk ignore create command with Consistent Ignores for Snyk Code." For Snyk Code findings, use snyk ignore create with the consistent-ignores flow instead of editing .snyk. Reserve .snyk policy files for open-source dependency findings, where snyk ignore writes blocks like ignore: { ISSUE_ID: [{ '*': { reason, expires } }] }.

Evidence

If you suppress a Snyk Code (SAST) finding by hand-editing .snyk or running snyk ignore, it silently does nothing: ignoring via the .snyk policy file is not supported for Snyk Code. Agents automating suppression in CI hit this when their ignore entries never take effect on code findings. The official snyk ignore help page states it twice: "Note: Ignoring issues or vulnerabilities using the .snyk file is not supported for Snyk Code. To ignore a Snyk Code finding from the command line, use the snyk ignore create command with Consistent Ignores for Snyk Code." For Snyk Code findings, use snyk ignore create with the consistent-ignores flow instead of editing .snyk. Reserve .snyk policy files for open-source dependency findings, where snyk ignore writes blocks like ignore: { ISSUEID: [{ '*': { reason, expires } }] }. Verified answer: If you suppress a Snyk Code (SAST) finding by hand-editing .snyk or running snyk ignore, it silently does nothing: ignoring via the .snyk policy file is not supported for Snyk Code. Agents automating suppression in CI hit this when their ignore entries never take effect on code findings. The official snyk ignore help page states it twice: "Note: Ignoring issues or vulnerabilities using the .snyk file is not supported for Snyk Code. To ignore a Snyk Code finding from the command line, use the snyk ignore create command with Consistent Ignores for Snyk Code." For Snyk Code findings, use snyk ignore create with the consistent-ignores flow instead of editing .snyk. Reserve .snyk policy files for open-source dependency findings, where snyk ignore writes blocks like ignore: { ISSUEID: [{ '*': { reason, expires } }] }. Source: https://github.com/snyk/cli/blob/HEAD/help/cli-commands/ignore.md

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_iHxZn_FipC5DFNwvy3Q0uw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">snyk ignore and .snyk policy files do not work for Snyk Code findings <span>— Vectle</span></a>

snyk ignore and .snyk policy files do not work for Snyk Code findings | Vectle