Comment on page
Snyk CLI for Open Source
Snyk Open Source scans your manifest files. Based on the scan, Snyk creates a hierarchical tree of the structure represented in the manifest file: both its direct and indirect (transitive) dependencies and the points at which the different packages are introduced.
After this tree is built, Snyk uses its vulnerability database to find vulnerabilities in any of the packages anywhere in the dependency tree. Using Snyk makes it easier to analyze the Project than fix the Project from its source. You can quickly identify the point at which any vulnerable package was introduced.
To test your Project for known vulnerabilities:
- Navigate to the folder containing your Project (
$ snyk test.
snyk testcommand identifies all the local dependencies and queries the Snyk service for known vulnerabilities.
snyk testdisplays the issues found along with additional information. For information about the snyk test results, see Review the Snyk Open Source CLI results.
For Node.js, Ruby, and Java Projects,
snyk testalso suggests fix steps.
snyk testruns, it tries to autodetect your Project type by looking for a manifest file and scanning the first of these files that it finds. Files that Snyk uses to autodetect the Project type include, but are not limited to, the following:
The way Snyk analyzes the file and builds the tree varies depending on the following: