Skip to content

Commit

Permalink
feat: add new iac (Infra as Code) mode
Browse files Browse the repository at this point in the history
  • Loading branch information
orkamara committed Jun 25, 2020
1 parent 430745a commit 17170c0
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
24 changes: 24 additions & 0 deletions help/iac.txt
@@ -0,0 +1,24 @@
Usage:

$ snyk iac [command] [options] --file=<path>

Find security issues in your Infrastructure as Code files.

Commands:

test ............... Test for any known issue.

Options:

-h, --help
--json .................................. Return results in JSON format.
--project-name=<string> ................. Specify a custom Snyk project name.
--policy-path=<path> .................... Manually pass a path to a snyk policy file.
--severity-threshold=<low|medium|high>... Only report issues of provided level or higher.

Examples:

$ snyk iac test /path/to/Kubernetes.yaml


For more information see https://support.snyk.io/hc/en-us/categories/360001342678-Infrastructure-as-code
8 changes: 8 additions & 0 deletions src/cli/modes.ts
Expand Up @@ -13,6 +13,14 @@ const modes: Record<string, ModeData> = {
args['docker'] = true;
args['experimental'] = true;

return args;
},
},
iac: {
allowedCommands: ['test'],
config: (args): [] => {
args['iac'] = true;

return args;
},
},
Expand Down
1 change: 1 addition & 0 deletions src/lib/types.ts
Expand Up @@ -41,6 +41,7 @@ export interface Options {
org?: string | null;
path: string;
docker?: boolean;
iac?: boolean;
file?: string;
policy?: string;
json?: boolean;
Expand Down

0 comments on commit 17170c0

Please sign in to comment.