Skip to content

Commit

Permalink
feat: add support for an HTTP proxy when using snyk-iac-test
Browse files Browse the repository at this point in the history
  • Loading branch information
francescomari committed Sep 14, 2022
1 parent f65c552 commit 3f82971
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cli/commands/test/iac/v2/index.ts
Expand Up @@ -61,6 +61,7 @@ async function prepareTestConfig(
const scan = options.scan ?? 'resource-changes';
const varFile = options['var-file'];
const cloudContext = getFlag(options, 'cloud-context');
const insecure = options.insecure;

return {
paths,
Expand All @@ -80,6 +81,7 @@ async function prepareTestConfig(
varFile,
depthDetection,
cloudContext,
insecure,
};
}

Expand Down
4 changes: 4 additions & 0 deletions src/lib/iac/test/v2/scan/index.ts
Expand Up @@ -160,6 +160,10 @@ function processFlags(
flags.push('-cloud-context', options.cloudContext);
}

if (options.insecure) {
flags.push('-http-tls-skip-verify');
}

return flags;
}

Expand Down
1 change: 1 addition & 0 deletions src/lib/iac/test/v2/types.ts
Expand Up @@ -20,4 +20,5 @@ export interface TestConfig {
varFile?: string;
depthDetection?: number;
cloudContext?: string;
insecure?: boolean;
}

0 comments on commit 3f82971

Please sign in to comment.