All apps/Snyk CLI

Snyk CLI

snyk-cli

A command-line interface for finding and fixing vulnerabilities in code and dependencies.

Runs as snyk|macOS, Linux, Windows|docs.snyk.io

Command form

ai-draft · 3 tasks · 10 fields

Test the current project for open-source vulnerabilities and license issues with snyk test. Other scan types (code, container, iac), monitor and ecosystem-specific options are left out.

Opens the form; the finished command lands at your prompt, unrun
otty gui snyk-cli

snyk test

Test for vulnerabilities

Check the project in the working directory for open-source vulnerabilities and license issues.

Test for vulnerabilitiesExample values, fixed in this page — nothing here reaches a terminal
Basic
Include dev dependencies
--dev
Severity threshold
4 choicesenum
Organization ID
string
TasksEach one presets the form for one job
Test this project
devseverity_thresholdorg
Test a monorepo
all_projectsdetection_depthexcludeseverity_threshold
Write JSON report
json_file_outputseverity_thresholdall_projects
ParametersOnly these flags are editable in the form
All projects
Auto-detect all projects in the working directory, including Yarn workspaces.
boolean
--all-projects
Include dev dependencies
boolean
--dev
Organization ID
string
--org
Manifest file
path
--file
Detection depth
integer
--detection-depth
Exclude names
Comma-separated directory or file names to skip.
string
--exclude
Severity threshold
enum
--severity-thresholdlowmediumhighcritical
Fail on
enum
--fail-onallupgradablepatchable
JSON output
boolean
--json
Save JSON to file
path
--json-file-output
SourcesEvery flag above is checked against these
help
`snyk test [<OPTIONS>]` ### `--all-projects` Auto-detect all projects in the working directory, including Yarn workspaces. ### `--detection-depth=<DEPTH>` ### `--exclude=<NAME>[,<NAME>]...>` ### `--dev` ### `--org=<ORG_ID>` ### `--file=<FILE>` ### `--json` ### `--severity-threshold=<low|medium|high|critical>` ### `--fail-on=<all|upgradable|patchable>` ### `-…
help

github.com

Before it fills your prompt, Otty checks the installed snyk against its version. A form that does not match your version is not offered.