CLI for Snyk Code
This feature is currently in beta.
Make sure Snyk Code is enabled for your organization, see Getting started with Snyk Code for details.
The Snyk Command Line Interface (CLI) for Snyk Code helps you find and fix security flaws in your code on your local machine.

Install the Snyk CLI

Use any of the following:
    npm: npm install -g snyk
    Homebrew: brew tap snyk/tap && brew install snyk
    Scoop: scoop bucket add snyk <>
    A manual installer available from GitHub
For more detailed installation guidance and options, see Install the Snyk CLI.


After installation, authenticate with Snyk to test your image, running snyk auth from the CLI:
snyk auth
For more details about authentication, see Authenticate the CLI with your account

Testing a project or folder

To test the current folder, run snyk code test with no parameters.
To test another context, run snyk code test <my-folder-path> with a path to a file or folder as the parameter.
All sub-folders inside the provided folder are also scanned.

"Not supported" message

Snyk Code is not supported for org
A minimum version of 1.716.0 is required to use CLI for Snyk Code.
Last modified 20d ago