Skip to content

Commit

Permalink
feat: pass remote-repo-url arg to snyk-iac-test
Browse files Browse the repository at this point in the history
  • Loading branch information
ofekatr committed Aug 17, 2022
1 parent 3b9f91b commit 18e8c87
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
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -71,6 +72,7 @@ async function prepareTestConfig(
projectTags,
targetReference: options['target-reference'],
targetName,
remoteRepoUrl,
};
}

Expand Down
4 changes: 4 additions & 0 deletions src/lib/iac/test/v2/scan/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ function processFlags(
flags.push('-target-name', options.targetName);
}

if (options.remoteRepoUrl) {
flags.push('-remote-repo-url', options.remoteRepoUrl);
}

return flags;
}

Expand Down
1 change: 1 addition & 0 deletions src/lib/iac/test/v2/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ export interface TestConfig {
projectTags?: Tag[];
targetReference?: string;
targetName?: string;
remoteRepoUrl?: string;
}

0 comments on commit 18e8c87

Please sign in to comment.