From 3b9f91bb283ed32374de24f090ee6bbf7c03223a Mon Sep 17 00:00:00 2001 From: Ofek Atar Date: Wed, 17 Aug 2022 18:42:37 +0300 Subject: [PATCH 1/2] chore: Updated snyk-iac-test version to v0.21.0 --- .../local-cache/policy-engine/constants/utils.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/iac/test/v2/setup/local-cache/policy-engine/constants/utils.ts b/src/lib/iac/test/v2/setup/local-cache/policy-engine/constants/utils.ts index 5e6a3d8aac..9366b2a1af 100644 --- a/src/lib/iac/test/v2/setup/local-cache/policy-engine/constants/utils.ts +++ b/src/lib/iac/test/v2/setup/local-cache/policy-engine/constants/utils.ts @@ -1,11 +1,11 @@ import * as os from 'os'; -const policyEngineChecksums = `0faf6c7d65d46c1d05a729e5bd73a1f5638734a06f363a93f8e1489c75cc23e4 snyk-iac-test_0.20.0_Windows_arm64.exe -2eea4e2cf236feb694701a5fe19c81f04cca3486e354a0593b04982b02790e0e snyk-iac-test_0.20.0_Linux_x86_64 -a7631d19ac3eb2eb62b4381813bfe7b5583311150dd3d8eab512b0d2f24c7f18 snyk-iac-test_0.20.0_Darwin_x86_64 -b266e90dc2f3fb2fb6c7f501b9906532680de245ae7572c6010e0f7168d64a40 snyk-iac-test_0.20.0_Darwin_arm64 -ca351817c3cfacac52cb2e9c138ca9d7a7a748fcdf884029176279cd78a350e9 snyk-iac-test_0.20.0_Linux_arm64 -e30f9277daac37e4f056396a111d0dc15144cb3abb7bced6b7386efa8258516d snyk-iac-test_0.20.0_Windows_x86_64.exe +const policyEngineChecksums = `4f86b8133caa3e27410c853a910a41551a92de3c6402891fc22d8306185a170a snyk-iac-test_0.21.1_Windows_arm64.exe +58b617385dcb1f7da100c1c04e50260d98dbee6811eda9575fc0a41367f9222e snyk-iac-test_0.21.1_Windows_x86_64.exe +6fdd0b0d944bc4986a061d1eec404c6ef5cc7cc5ce4d9a3755b3dd24aa89af57 snyk-iac-test_0.21.1_Darwin_x86_64 +80dc9ab2b4b51df29d4a3edd994a394c1c62d6c1f2d364ce98e1b5365a05f855 snyk-iac-test_0.21.1_Linux_arm64 +b06f169fc03f6e6c3c7047c9270c6b7b20496070122ed3babeedd7e568c98009 snyk-iac-test_0.21.1_Linux_x86_64 +c98a06db1bafa683cc479ecf77e7191eb94ece82dfdf9c229ac7258e73094f10 snyk-iac-test_0.21.1_Darwin_arm64 `; export const policyEngineVersion = getPolicyEngineVersion(); From 18e8c87dc5d3dff91b22fd894c37d0864333ed5d Mon Sep 17 00:00:00 2001 From: Ofek Atar Date: Wed, 17 Aug 2022 18:42:48 +0300 Subject: [PATCH 2/2] feat: pass remote-repo-url arg to snyk-iac-test --- src/cli/commands/test/iac/v2/index.ts | 2 ++ src/lib/iac/test/v2/scan/index.ts | 4 ++++ src/lib/iac/test/v2/types.ts | 1 + 3 files changed, 7 insertions(+) diff --git a/src/cli/commands/test/iac/v2/index.ts b/src/cli/commands/test/iac/v2/index.ts index 459e1f2d75..99e3e948d1 100644 --- a/src/cli/commands/test/iac/v2/index.ts +++ b/src/cli/commands/test/iac/v2/index.ts @@ -56,6 +56,7 @@ async function prepareTestConfig( const orgSettings = await getIacOrgSettings(org); const projectTags = parseTags(options); const targetName = getFlag(options, 'target-name'); + const remoteRepoUrl = getFlag(options, 'remote-repo-url'); const attributes = parseAttributes(options); @@ -71,6 +72,7 @@ async function prepareTestConfig( projectTags, targetReference: options['target-reference'], targetName, + remoteRepoUrl, }; } diff --git a/src/lib/iac/test/v2/scan/index.ts b/src/lib/iac/test/v2/scan/index.ts index 94917ee4ea..322eaa531f 100644 --- a/src/lib/iac/test/v2/scan/index.ts +++ b/src/lib/iac/test/v2/scan/index.ts @@ -133,6 +133,10 @@ function processFlags( flags.push('-target-name', options.targetName); } + if (options.remoteRepoUrl) { + flags.push('-remote-repo-url', options.remoteRepoUrl); + } + return flags; } diff --git a/src/lib/iac/test/v2/types.ts b/src/lib/iac/test/v2/types.ts index a24b052cab..1e67341de9 100644 --- a/src/lib/iac/test/v2/types.ts +++ b/src/lib/iac/test/v2/types.ts @@ -15,4 +15,5 @@ export interface TestConfig { projectTags?: Tag[]; targetReference?: string; targetName?: string; + remoteRepoUrl?: string; }