browse
Download binary →
snyk/Snyk CLI
SnykDeveloper security CLI for finding and fixing vulnerabilities in code, dependencies, and containers.
Security & IdentityJSON
01Agent Notes
snyk scans for vulnerabilities. `snyk test` for dependencies, `snyk container test` for images, `snyk iac test` for IaC. Always pass `--json` for machine output. Exit codes: 0=no vulns, 1=vulns found, 2=error. Use `--severity-threshold=high` to filter. `snyk monitor` to upload results to Snyk dashboard for ongoing monitoring.
02Global Flags
| Flag | Type | Description |
|---|---|---|
--json | boolean | Output results as JSON |
--severity-threshold | enum [low, medium, high, critical] | Minimum severity level to report |
--org | string | Snyk organization to use |
--all-projects | boolean | Detect and scan all projects in the working directory |
03Authentication
Methods
access-tokenenvironment-variables
Env vars
SNYK_TOKENSNYK_ORGSetup
snyk auth04Install
brew install snyk05Capabilities
Reference
binary
snykcheck
snyk --versionauth
access-token, environment-variablesformats
textjson flag
--jsonversion
1.1303.1