Skip to content

Commit

Permalink
feat(scan): add template to scan create/retest
Browse files Browse the repository at this point in the history
closes #464
  • Loading branch information
brightAMasiuk committed Oct 4, 2023
1 parent 19f53a6 commit 845d79b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Commands/RunScan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ export class RunScan implements CommandModule {
string: true,
describe: 'ID of the project'
})
.option('template', {
alias: 'tp',
requiresArg: false,
string: true,
describe: 'ID of the template'
})
.option('module', {
default: Module.DAST,
requiresArg: true,
Expand Down Expand Up @@ -178,6 +184,7 @@ export class RunScan implements CommandModule {
module: args.module,
authObjectId: args.auth,
projectId: args.project,
templateId: args.template,
buckets: args.bucket,
hostsFilter: args.hostFilter,
headers: Helpers.parseHeaders(args.header as string[]),
Expand Down
2 changes: 2 additions & 0 deletions src/Scan/RestScans.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ describe('RestScans', () => {
const scanConfig: ScanConfig = {
name: 'scan',
module: Module.DAST,
buckets: [],
tests: [],
fileId: 'id'
};
Expand Down Expand Up @@ -100,6 +101,7 @@ describe('RestScans', () => {
const scanConfig: ScanConfig = {
name: 'scan',
module: Module.DAST,
buckets: [],
tests: [],
fileId: 'id'
};
Expand Down
1 change: 1 addition & 0 deletions src/Scan/Scans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export interface ScanConfig {
module: Module;
authObjectId?: string;
projectId?: string;
templateId?: string;
discoveryTypes?: Discovery[];
tests: TestType[];
buckets: string[];
Expand Down

0 comments on commit 845d79b

Please sign in to comment.