Skip to content

Commit

Permalink
Merge branch 'next' into feat/discoveries
Browse files Browse the repository at this point in the history
  • Loading branch information
orubin authored Dec 3, 2024
2 parents fe064b7 + dc02da4 commit ee51434
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 10 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brightsec/cli",
"version": "13.0.0-next.7",
"version": "13.0.0-next.8",
"private": false,
"repository": {
"type": "git",
Expand Down
28 changes: 28 additions & 0 deletions src/Commands/RunRepeater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(' ')) {
Expand All @@ -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(' ');
}
Expand Down Expand Up @@ -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) => {
Expand Down
3 changes: 1 addition & 2 deletions src/Commands/RunScan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ee51434

Please sign in to comment.