Running tests
You can use Snyk to test your code in different ways:
- Scan open-source code with
snyk test
. - Scan application code with
snyk code test
. - Scan container images with
snyk container test
. - Scan Infrastructure as Code (IaC) files with
snyk iac test
.
A test is run when you import a Snyk Project (see Import a Project), or click the Retest now button on a Project in the Overview tab.
Snyk provides automatic scanning functions with recurring tests, allowing you to catch new vulnerabilities automatically. After you import a project, Snyk automatically runs periodic checks to see if your code is affected by newly disclosed vulnerabilities.
Test frequency is set to daily by default. To change frequency, go to either the Usage page (see Usage page details) or the project Settings page (see View project settings).
Use the
snyk monitor
CLI command to create a snapshot of a project on the Snyk website that will be continuously monitored for new vulnerabilities.Snyk can be enabled to scan every Pull Request (PR) submitted on your monitored repositories for vulnerabilities, to help prevent new vulnerabilities being added to your codebase.
Last modified 20h ago