IaC rules test


Feature availability: This feature is in Early Access.

snyk iac rules test [<OPTIONS>]


The snyk iac rules test command runs all the tests written in Rego.

For a list of related commands run snyk iac --help

Configure the Snyk CLI

You can use environment variables and set variables for connecting with the Snyk API; see Configure the Snyk CLI


Use the -d option to output the debug logs.


See also subsequent sections for options for specific build environments, package managers, languages, and [<CONTEXT-SPECIFIC OPTIONS>] which you specify last.


Overwrite the expected spec files to ensure that the test passes in the next run. This assumes that the tests were written correctly.

Example for snyk iac rules test command

Run tests for all rules

snyk iac rules test

Last updated

More information

Snyk privacy policy

© 2023 Snyk Limited | All product and company names and logos are trademarks of their respective owners.