public class ZapDriver extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
COMPLETED_PERCENTAGE |
static int |
ZAP_INITIALIZE_TIMEOUT |
static int |
ZAP_INITIALIZE_WAIT |
static long |
ZAP_SCAN_SLEEP |
| Constructor and Description |
|---|
ZapDriver() |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getAllowedHosts() |
HashMap<Integer,Integer> |
getFailBuild() |
String |
getZapHost() |
int |
getZapPort() |
int |
getZapTimeout() |
boolean |
importUrls(String path)
Imports URLs from a text file
|
boolean |
loadPolicy(String policy)
Loads a ZAP policy from a file path
|
boolean |
loadSession(String sessionPath)
Loads a ZAP session
|
void |
setAllowedHosts(List<String> allowedHosts) |
void |
setFailBuild(int all,
int high,
int med,
int low) |
void |
setZapHost(String zapHost) |
boolean |
setZapMode(String mode) |
void |
setZapPort(int zapPort) |
void |
setZapTimeout(int timeout) |
boolean |
shutdownZap() |
boolean |
startZapCrawler(String host)
Starts the ZAP crawler on a specified URL
|
boolean |
startZapProcess(String zapHome,
hudson.FilePath ws,
hudson.Launcher launcher)
Starts the ZAP process
|
boolean |
zapAttack(RunZapAttackStepParameters zsp)
Starts the ZAP attack.
|
int |
zapAttackStatus()
Gets the current status of the started attacks (average of all)
|
int |
zapCrawlerStatus()
Gets the current status of the started attacks (average of all)
|
public static final int COMPLETED_PERCENTAGE
public static final long ZAP_SCAN_SLEEP
public static final int ZAP_INITIALIZE_TIMEOUT
public static final int ZAP_INITIALIZE_WAIT
public boolean shutdownZap()
public boolean setZapMode(String mode)
public boolean startZapCrawler(String host)
host - The host to attackpublic int zapCrawlerStatus()
public boolean importUrls(String path)
path - - The path to load frompublic boolean loadSession(String sessionPath)
sessionPath - - The path of the .session filepublic boolean loadPolicy(String policy)
policy - - The path to load frompublic boolean zapAttack(RunZapAttackStepParameters zsp)
zsp - The parameters from the groovy steppublic int zapAttackStatus()
public boolean startZapProcess(String zapHome, hudson.FilePath ws, hudson.Launcher launcher)
zapHome - - The location of the zap.sh filews - - Passed by steplauncher - - Passed by steppublic void setZapHost(String zapHost)
public void setZapPort(int zapPort)
public void setFailBuild(int all,
int high,
int med,
int low)
public void setZapTimeout(int timeout)
public int getZapTimeout()
public int getZapPort()
public String getZapHost()
Copyright © 2016–2018. All rights reserved.