From a62549d4b0beb07c219216174485540ecce36e2e Mon Sep 17 00:00:00 2001 From: maksadbek Date: Fri, 19 Jul 2024 18:56:11 +0200 Subject: [PATCH] fix(scan): correct param handling to respect user provided values (#566) the `applyDefaultSettings` was doing null check a little wrong and as a result the default param were always applied. --- src/Scan/RestScans.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Scan/RestScans.ts b/src/Scan/RestScans.ts index 570bc65c..08a13d20 100644 --- a/src/Scan/RestScans.ts +++ b/src/Scan/RestScans.ts @@ -150,9 +150,9 @@ export class RestScans implements Scans { scanConfig: Omit ): Promise> { const attackParamLocations = - scanConfig.attackParamLocations ?? scanConfig.templateId - ? undefined - : [...ATTACK_PARAM_LOCATIONS_DEFAULT]; + scanConfig.attackParamLocations ?? + (scanConfig.templateId ? undefined : [...ATTACK_PARAM_LOCATIONS_DEFAULT]); + const exclusions = scanConfig.exclusions?.params || scanConfig.exclusions?.requests ? scanConfig.exclusions