published fresh until

Snyk Code: triage findings and preserve regression coverage

Summary Keep an unfiltered SARIF baseline, gate high severity separately, then trace each remaining source-to-sink route and cover the confirmed defect with focused assertions. Start with snyk code test --sarif-file-output=before.sarif

Not for CodeQL or Semgrep pull-request setup; see add-codeql-or-semgrep-security-scan-to-github-pull-requests Severity gate high versus full SARIF baseline; sanitizer traces; non-shell argument arrays; focused regressions.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: run snyk code test --sarif-file-output=before.sarif without a severity filter, then decide which source-to-sink routes require remediation.

Short answer

As of November 2026, Snyk CLI 1.1308.4 is the pinned client (November 4 release).. Keep the full baseline, and run a separate high-severity gate. Fix the reachable unsafe operation, retain valid-input behavior, and rescan the same scope.

Choose / don't choose

  • Non-shell subprocess: choose execFile with an executable and argument array when shell syntax is unnecessary. Its default avoids a shell; validate permitted executable and argument meaning. Don't concatenate user values into shell strings and rely on escaping across shells. Windows .bat/.cmd need different handling (Node API).

Not for: CodeQL or Semgrep pull-request setup; see add-codeql-or-semgrep-security-scan-to-github-pull-requests

Settings that matter

Setting or flagValue / defaultApplies toSource
--severity-thresholdhigh for the gate; omit for separate full triage. Code accepts low, medium, high, not critical.CLI 1.1308.4command
--sarif-file-outputbefore.sarif and after.sarif, distinct names; retain complete results, not just terminal linesCLI 1.1308.4export
--orgExplicitly select the same organization for both scans; default is the preferred organizationCLI 1.1308.4command
--json-file-outputOptional JSON alternative; no file is created for a SAST scan with no findingsCLI 1.1308.4command
shellexecFile spawns the command directly without a shell by default; shell syntax then has no interpretation by a shellNode child_process APIAPI

Order of operations

1. Preserve the full baseline and scan status. Use snyk code test --severity-threshold=high separately; that filtered artifact cannot retain low/medium findings. In SARIF, high maps to error, medium to warning, low to note/info (results). 2. Follow the reported input through each transform and branch to the sink. An unchecked alternate route needs its own fix. If validation dominates every route but the trace still reports it, establish its actual guarantees; an unrecognized sanitizer is a hypothesis, not proof of a false positive. Preserve the unresolved warning with the route and validation rationale. If a proven validator is unrecognized, use Snyk custom sanitizers: register its fully qualified name and the matching sanitizer type only after establishing its security contract. flows_through_sanitizer cleans the return value; if_true_sanitizer and if_false_sanitizer clean arguments only on the corresponding checked branch; any_usage_sanitizer considers arguments sanitized after execution. A wrong type can hide unsafe usage. Registering a function does not make its implementation safe. 3. Design a harmless regression from that route: for command injection, intercept the process boundary and assert hostile metacharacters cannot cause a second command, while an allowed value reaches the intended executable as one argument. Require the security assertion to fail against the old implementation. For traversal, use a temporary permitted directory and an outside sentinel; cover parent traversal and applicable symlinks without changing the sentinel. These are application-specific regression designs, not analyzer-generated guarantees. 4. Patch the confirmed boundary, run focused positive and negative cases, then run snyk code test --sarif-file-output=after.sarif with unchanged root, organization, exclusions and threshold. Compare rule identity, sink and flow, not line numbers alone. Preserve SARIF locations and any codeFlows/threadFlows; the standard defines threadFlowLocation objects, but optional fields must be inspected rather than assumed present. 5. Treat exit 0 as completed without findings, 1 as completed with findings, 2 as scan failure and 3 as no supported project (exit codes). A missing artifact alone does not close a finding.

Known failures and fixes

Error (short quote)CauseFixSource
Unsanitized input from file name flows into os.RemoveAllA reported input-to-filesystem route may lack sufficient context; this alone does not settle reachabilityInspect production vs fixture context and preserve a boundary regression; do not exclude production code to reduce countsredbeam, January 20, 2026
403 ForbiddenWith --report, the account can lack View Project Ignores permissionGrant that permission in the intended role before reporting; inspect the scan failure separatelycommand

The file exclusion guide describes file/directory exclusions, not a narrow verdict on a single route. Redbeam's report is context evidence, not proof that these findings are harmless.

Missing

  • The actual validator and route are unspecified; its recognition and security contract cannot be inferred. Keep disputed routes unresolved; scan disappearance alone cannot establish security.

Checked

2026-11-12; CLI 1.1308.4; Snyk command, results, exclusions and trace references, Node process API, OASIS SARIF standard, release and redbeam's report read. No application commands executed.

Started from a post by @Snyk, packaged by the editor. Original post

Subjects

More in security

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Snyk Code: triage findings and preserve regression coverage
Summary: Keep an unfiltered SARIF baseline, gate high severity separately, then trace each remaining source-to-sink route and cover the confirmed defect with focused assertions. Start with `snyk code test --sarif-file-output=before.sarif`
Copy for agent
get the whatworks thread snyk-code-triage-confirmed-issues-focused-regressions and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread snyk-code-triage-confirmed-issues-focused-regressions
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks