Skip to content

Commit

Permalink
Remove updatePlugins check - it's not enough
Browse files Browse the repository at this point in the history
  • Loading branch information
SOOS-GSteen committed Sep 24, 2024
1 parent b4dfeab commit 2ac01b8
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 19 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ The basic command to run a baseline scan would look like:
| `--projectName` | | Project Name - this is what will be displayed in the SOOS app |
| `--requestHeaders` | | Set extra Header requests |
| `--scanMode` | `baseline` | Scan Mode - Available modes: baseline, fullscan, and apiscan (for more information about scan modes visit https://github.com/soos-io/soos-dast#scan-modes) |
| `--updatePlugins` | | Update ZAP plugins before running. |

## Scan Modes

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": "soos-dast",
"version": "3.0.3",
"version": "3.0.4",
"description": "SOOS DAST - The affordable no limit web vulnerability scanner",
"main": "index.js",
"scripts": {
Expand Down
7 changes: 0 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export interface SOOSDASTAnalysisArgs extends IBaseScanArguments {
requestCookies: string;
requestHeaders: string;
scanMode: ScanMode;
updatePlugins: boolean;
targetURL: string;
}

Expand Down Expand Up @@ -241,12 +240,6 @@ class SOOSDASTAnalysis {
},
);

analysisArgumentParser.argumentParser.add_argument("--updatePlugins", {
help: "Set to true to update the ZAP plugins before running.",
action: "store_true",
required: false,
});

analysisArgumentParser.argumentParser.add_argument("targetURL", {
help: "Target URL - URL of the site or api to scan. The URL should include the protocol. Ex: https://www.example.com",
});
Expand Down
2 changes: 0 additions & 2 deletions src/utilities/ZAPCommandGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ export class ZAPCommandGenerator {
this.addEnvironmentVariable("EXCLUDE_URLS_FILE", this.config.excludeUrlsFile);
this.addEnvironmentVariable("OAUTH_PARAMETERS", this.config.oauthParameters);
this.addEnvironmentVariable("OAUTH_TOKEN_URL", this.config.oauthTokenUrl);
if (this.config.updatePlugins)
this.addEnvironmentVariable("UPDATE_PLUGINS", this.config.updatePlugins);
}

private generateCommand(args: string[]): string {
Expand Down
6 changes: 0 additions & 6 deletions src/zap_hooks/helpers/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class DASTConfig:
header: Optional[str] = None
oauth_token_url: Optional[str] = None
oauth_parameters: Optional[str] = None
update_plugins: Optional[bool] = False
xss_collector: Optional[str] = None

def __init__(self):
Expand Down Expand Up @@ -68,14 +67,9 @@ def load_config(self, extra_zap_params):
self.header = os.environ.get('CUSTOM_HEADER') or EMPTY_STRING
self.oauth_token_url = os.environ.get('OAUTH_TOKEN_URL') or EMPTY_STRING
self.oauth_parameters = self._get_hook_param_list(os.environ.get('OAUTH_PARAMETERS')) or EMPTY_STRING
self.update_plugins = os.environ.get('UPDATE_PLUGINS') or False
self.xss_collector = os.environ.get('XSS_COLLECTOR') or EMPTY_STRING

self.extra_zap_params = extra_zap_params
# NOTE: by default, we skip the addon update in case there are breaking changes and our image hasn't been updated yet.
if self.update_plugins is False and "-addonupdate" in self.extra_zap_params:
self.extra_zap_params.remove("-addonupdate")
log(f"Removing plugin update argument.")
log(f"Extra params passed by ZAP: {self.extra_zap_params}")

except Exception as error:
Expand Down

0 comments on commit 2ac01b8

Please sign in to comment.