From e7a1a886a5e07adacc3884d1e2598028492bd9a9 Mon Sep 17 00:00:00 2001 From: maksadbek Date: Tue, 3 Dec 2024 12:38:26 +0100 Subject: [PATCH 1/4] chore: replace yum with dnf for redhat/ubi8 (#625) the centos/devtoolset-7-toolchain-centos7:7 has been replaced by redhat/ubi8, but install scripts were not. This change replaces the yum commands with a dnf. --- .github/workflows/deploy.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ede778e8..9be7ca95 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -97,11 +97,12 @@ jobs: - name: Install dev-deps if: startsWith(matrix.os, 'ubuntu') run: | - sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \ - && sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \ - && yum install build-essential python3 -y \ - && yum clean all -y \ - && rm -rf /var/cache/yum + dnf install -y dnf-utils \ + && dnf config-manager --enable ubi-8-appstream \ + && dnf config-manager --enable ubi-8-baseos \ + && dnf install -y python3 gcc gcc-c++ make \ + && dnf clean all \ + && rm -rf /var/cache/dnf - name: Install deps uses: ./.github/workflows/composite/npm From cb097a2ce86ecd17e8315cab4554752beb598b06 Mon Sep 17 00:00:00 2001 From: Ruslan Panamarenka Date: Tue, 3 Dec 2024 12:39:03 +0100 Subject: [PATCH 2/4] docs: update concurrency option description for scan:run command (#623) Co-authored-by: Or Rubin --- src/Commands/RunScan.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Commands/RunScan.ts b/src/Commands/RunScan.ts index bfee5e49..6632c46e 100644 --- a/src/Commands/RunScan.ts +++ b/src/Commands/RunScan.ts @@ -153,8 +153,7 @@ export class RunScan implements CommandModule { default: 10, requiresArg: true, describe: - 'Number of parallel requests to send. ' + - 'The default value is 10, but it can be increased up to 50 to improve performance.' + 'Number of maximum concurrent requests allowed to be sent to the target, can range between 1 to 50 (default: 10).' }) .option('param', { array: true, From c331d16c5081db0a2daeafaf1cac7c0ba66a7989 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 3 Dec 2024 11:39:29 +0000 Subject: [PATCH 3/4] chore(release): cut the 13.0.0-next.8 release [skip ci] --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6031b44a..9f49c917 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@brightsec/cli", - "version": "13.0.0-next.7", + "version": "13.0.0-next.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@brightsec/cli", - "version": "13.0.0-next.7", + "version": "13.0.0-next.8", "license": "MIT", "dependencies": { "@neuralegion/os-service": "^1.2.6", diff --git a/package.json b/package.json index fadef574..0e5c843d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@brightsec/cli", - "version": "13.0.0-next.7", + "version": "13.0.0-next.8", "private": false, "repository": { "type": "git", From dc02da4b942d6e23a5ca1061d76dcf58b4bd2c21 Mon Sep 17 00:00:00 2001 From: maksadbek Date: Tue, 3 Dec 2024 12:43:22 +0100 Subject: [PATCH 4/4] chore(repeater): validate proxy-domains and proxy-domains-bypass flags (#624) Co-authored-by: Or Rubin --- src/Commands/RunRepeater.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/Commands/RunRepeater.ts b/src/Commands/RunRepeater.ts index c929eddb..9e41e041 100644 --- a/src/Commands/RunRepeater.ts +++ b/src/Commands/RunRepeater.ts @@ -138,6 +138,10 @@ export class RunRepeater implements CommandModule { describe: 'Space-separated list of domains that should be routed through the proxy. This option is only applicable when using the --proxy option', coerce(arg: string[]): string[] { + if (arg[0] === undefined) { + return undefined; + } + // if values are passed from env variable, they are passed as a single string if (arg.length === 1) { if (arg[0].includes(' ')) { @@ -161,6 +165,10 @@ export class RunRepeater implements CommandModule { coerce(arg: string[]): string[] { // if values are passed from env variable, they are passed as a single string if (arg.length === 1) { + if (arg[0] === undefined) { + return undefined; + } + if (arg[0].includes(' ')) { return arg[0].trim().split(' '); } @@ -193,6 +201,26 @@ export class RunRepeater implements CommandModule { ); } + const proxyDomains = (args.proxyDomains as string[]) ?? []; + for (const domain of proxyDomains) { + if (domain.includes(',')) { + throw new Error( + `Option --proxy-domains has a wrong value.` + + `Please ensure that --proxy-domains option has space separated list of domain values` + ); + } + } + + const proxyDomainsBypass = (args.proxyDomainsBypass as string[]) ?? []; + for (const domain of proxyDomainsBypass) { + if (domain.includes(',')) { + throw new Error( + `Option --proxy-domain-bypass has wrong value.` + + `Please ensure that --proxy-domain-bypass option has space separated list of domain values` + ); + } + } + return true; }) .middleware((args: Arguments) => {