From 129642674224d17eeafff43d34af10c92473da2c Mon Sep 17 00:00:00 2001 From: Maksadbek Date: Mon, 6 Jan 2025 20:21:42 +0100 Subject: [PATCH 1/2] feat(run-scan): add entrypoints parameter --- run-scan/action.yml | 3 +++ run-scan/src/config.ts | 1 + run-scan/src/index.ts | 3 +++ 3 files changed, 7 insertions(+) diff --git a/run-scan/action.yml b/run-scan/action.yml index 0de5292..7d9f426 100644 --- a/run-scan/action.yml +++ b/run-scan/action.yml @@ -44,6 +44,9 @@ inputs: tests: description: 'A list of tests which you want to run during a scan.' required: false + entrypoints: + description: 'A list of entrypoints which you want to scan.' + required: false outputs: url: diff --git a/run-scan/src/config.ts b/run-scan/src/config.ts index fe01965..fd32082 100644 --- a/run-scan/src/config.ts +++ b/run-scan/src/config.ts @@ -23,6 +23,7 @@ export interface Config { projectId?: string; hostsFilter?: string[]; tests?: TestType[]; + entryPointIds?: string[]; } const invalidUrlProtocols: ReadonlySet = new Set([ diff --git a/run-scan/src/index.ts b/run-scan/src/index.ts index dfcfe9b..668e817 100644 --- a/run-scan/src/index.ts +++ b/run-scan/src/index.ts @@ -35,6 +35,7 @@ const module_in = core.getInput('module'); const hostsFilter = getArray('hosts_filter'); const type = core.getInput('type'); const hostname = core.getInput('hostname'); +const entrypoints = getArray('entrypoints'); const baseUrl = hostname ? `https://${hostname}` : 'https://app.brightsec.com'; @@ -111,10 +112,12 @@ if (restartScanID) { ? [Discovery.ARCHIVE] : discoveryTypesIn; const uniqueTests = tests ? [...new Set(tests)] : undefined; + const config: Config = { name, discoveryTypes, module, + entryPointIds: entrypoints, ...(crawlerUrls ? { crawlerUrls } : {}), ...(fileId ? { fileId } : {}), ...(projectId ? { projectId } : {}), From 5827faaea81e156c9e978626c9c3a332d7d20cc1 Mon Sep 17 00:00:00 2001 From: Maksadbek Date: Mon, 6 Jan 2025 20:38:40 +0100 Subject: [PATCH 2/2] chore: update the package-lock.json --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index a441d5f..38d8f25 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1611,9 +1611,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.17.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.11.tgz", - "integrity": "sha512-Ept5glCK35R8yeyIeYlRIZtX6SLRyqMhOFTgj5SOkMpLTdw3SEHI9fHx60xaUZ+V1aJxQJODE+7/j5ocZydYTg==", + "version": "20.17.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.12.tgz", + "integrity": "sha512-vo/wmBgMIiEA23A/knMfn/cf37VnuF52nZh5ZoW0GWt4e4sxNquibrMRJ7UQsA06+MBx9r/H1jsI9grYjQCQlw==", "dev": true, "dependencies": { "undici-types": "~6.19.2"