snyk /cli

Snyk CLI scans and monitors your projects for security vulnerabilities.

★ 5,710⑂ 699👁 150⑃ 6,915● 0▤ 1,835
TypeScriptNOASSERTIONCreated 2015-10-30snyk.io
下载:v1.1308.4v1.1308.4 ↓1.1308.42026-11-04
+0
日增长
5,710
stars
699
forks
150
watchers
6,915
prs
0
issues
1,835
releases

README

Getting started with the Snyk CLI

 Introduction to the Snyk CLI

Snyk is a developer-first, cloud-native security tool to scan and monitor your software development projects for security vulnerabilities. Snyk scans multiple content types for security issues:

- Snyk Open Source: Find and automatically fix open-source vulnerabilities
- Snyk Code: Find and fix vulnerabilities in your application code in real time
- Snyk Container: Find and fix vulnerabilities in container images and Kubernetes applications
- Snyk IaC: Find and fix insecure configurations in Terraform and Kubernetes code

The Snyk CLI brings the functionality of Snyk into your development workflow. You can run the CLI locally from the command line or in an IDE. You can also run the CLI in your CI/CD pipeline. The following shows an example of Snyk CLI test command output.

Snyk CLI test command output example

Snyk CLI scanning supports many languages and tools. For detailed information, see the following:

- Supported languages, package managers, and frameworks for Open Source and Snyk Code
- Supported operating system distributions for Container
- Supported IaC Languages and cloud providers

This page explains how to install, authenticate, and start scanning using the CLI. Snyk also has an onboarding wizard to guide you through these steps. For a demonstration, view Starting with Snyk: an overview of the CLI onboarding flow.

 Install the Snyk CLI and authenticate your machine

To use the CLI, you must install it and authenticate your machine. See Install or update the Snyk CLI and Authenticate the CLI with your account. You can refer to the release notes for a summary of changes in each release. Before scanning your code, review the Code execution warning for Snyk CLI.

{% hint style="info" %}
Before you can use the CLI for Open Source scanning, you must install your package manager. The needed third-party tools, such as Gradle or Maven, must be in the PATH.
{% endhint %}

You can also install the CLI in your IDE or CI/CD environment. For details, see the IDE and CI/CD documentation for instructions for each integration.

 Test your installation

After authenticating, you can test your installation. For a quick test, run snyk --help.

Alternatively, you can perform a quick test on a public npm package, for example snyk test ionic.

Look at the test command report in your terminal. The report shows the vulnerabilities Snyk found in the package. For each issue found, Snyk reports the severity of the issue, provides a link to a detailed description, reports the path through which the vulnerable module got into your system, and provides guidance on how to fix the problem.

 Scan your development Project

Before using the Snyk CLI to test your Open Source Project for vulnerabilities, with limited exceptions, you must build your Project. For details, see Open Source Projects that must be built before testing.

In addition, depending on the language of your open-source Project, you may

Latest release

v1.1308.4 v1.1308.4 2026-11-04
1.1308.4 (2026-11-04)

The Snyk CLI is being deployed to different deployment channels, users can select the stability level according to their needs. For details please see this documentation

 Bug Fixes

 iac: Fixes a panic in snyk iac test when an ARM template contains a property with a null value. (fbae7febd)
 maven: Fixes --include-component-metadata dropping the distribution:url label for every Maven dependency when using Maven 3.10. (c783feecc)
 language server: Bug fixes for Snyk Language Server used by the Snyk IDE plugins. (ef0db2c0b)
 deps: Updates dependencies to fix vulnerabilitie

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON