snyk CLI reference
ModularPipelines.Snyk provides strongly typed access to the snyk CLI.
Executable prerequisite
This package does not install the snyk executable. Install it separately and ensure snyk is available on PATH.
Follow the executable's official documentation for installation instructions.
Package installation
dotnet add package ModularPipelines.Snyk
Resolve the service with context.Tools.Snyk.
Projects using C# 13 or another .NET language can use context.Tools.Get<ModularPipelines.Snyk.Services.ISnyk>() instead.
Module example
Resolve the service in a module, then select a command from the table below. A runnable example is omitted when no command has complete safety metadata:
var snyk = context.Tools.Snyk;
Commands
| CLI command | Options record |
|---|---|
snyk aibom | SnykAibomOptions |
snyk aibom test | SnykAibomTestOptions |
snyk auth | SnykAuthOptions |
snyk code test | SnykCodeTestOptions |
snyk container monitor | SnykContainerMonitorOptions |
snyk container sbom | SnykContainerSbomOptions |
snyk container test | SnykContainerTestOptions |
snyk iac | SnykIacOptions |
snyk iac describe | SnykIacDescribeOptions |
snyk iac test | SnykIacTestOptions |
snyk iac update-exclude-policy | SnykIacUpdateExcludePolicyOptions |
snyk ignore | SnykIgnoreOptions |
snyk log4shell | SnykLog4shellOptions |
snyk monitor | SnykMonitorOptions |
snyk policy | SnykPolicyOptions |
snyk sbom | SnykSbomOptions |
snyk sbom test | SnykSbomTestOptions |
snyk test | SnykTestOptions |