Skip to content

Commit

Permalink
Remove not necessary call and add documentation #3622
Browse files Browse the repository at this point in the history
  • Loading branch information
winzj committed Nov 26, 2024
1 parent 9b34ad4 commit b05e13b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions sechub-wrapper-owasp-zap/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ The script can also be created completely without using anything of the pre-defi
The `TOTPGenerator` is an easy to use implementation of TOTP for two-factor-authentication if necessary. Using `totpGenerator.now()` returns the currently valid TOTP.
To make use of the script authentication the wrapper application expects a SecHub configuration json for the scan, which contains a template data definition and optionally a TOTP configuration.
See web scan example configurations for details.

WARNING: **The script should always ensure that the target URL is loaded in the browser at the end after the authentication because the caller needs to access the session data.**

The following example contains all available bindings, even if they are unused in the script below:

[source,groovy]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ public ScriptLoginResult executeScript(File scriptFile, ZapScanContext scanConte
LOG.info("Execute groovy login script.");
scriptEngine.eval(script, bindings);

// load target URL to ensure the correct page is loaded in the browser
firefox.get(scanContext.getTargetUrlAsString());

LOG.info("Execution successful, perparing login result with session data.");
loginResult.setSessionCookies(firefox.manage().getCookies());
loginResult.setSessionStorage(retrieveStorage(firefox, SESSION_STORAGE));
Expand Down

0 comments on commit b05e13b

Please sign in to comment.