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 <https://github.com/snyk/scoop-snyk>
    A manual installer available from GitHub
For more detailed installation guidance and options, see Install the Snyk CLI.

Authentication

After installation, authenticate with Snyk to test your image, running snyk auth from the CLI:
1
snyk auth
Copied!
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 your.org
A minimum version of 1.716.0 is required to use CLI for Snyk Code.
Last modified 20d ago