Please note that we're currently working on an improved solution that will automatically scan for multiple files in the CLI. Currently, when a user tries to test a project that contains several manifest files in the CLI by using
snyk test OR
Snyk will only pick the first manifest file and run the test on it. Snyk will not scan the entire project.
The user needs to specify every target file to cover all the project dependencies.
You can use a command such as the following to pull all the relevant manifest files in a project:
for i in $(find . -name "<manifest file>"); do snyk monitor --file="$i"; done
*Replace <manifest file> with an appropriate filename such as
pom.xml, Gemfile, etc. You can replace `monitor` with `test` as well.
For an advanced example, you can use the following command to test all Maven, NodeJS and Pip manifest files at once:
for i in $(find . -name "pom.xml" -o -name "package.json" -o -name "requirements.txt"); do snyk monitor --file=$i";done
List of all the manifest files that Snyk support:
package-lock.json or yarn.lock
.NET Framework -
.NET Core -
Go - Go.mod