use of com.mercedesbenz.sechub.owaspzapwrapper.scan.OwaspZapScan in project sechub by mercedes-benz.
the class OwaspZapScanExecutor method execute.
public void execute(OwaspZapScanConfiguration scanConfig) throws MustExitRuntimeException {
if (!connectionChecker.isTargetReachable(scanConfig.getTargetUri(), scanConfig.getProxyInformation())) {
// Build error message containing proxy if it was set.
String errorMessage = createErrorMessage(scanConfig);
throw new MustExitRuntimeException(errorMessage, MustExitCode.EXECUTION_FAILED);
}
ClientApi clientApi = null;
clientApi = clientApiFactory.create(scanConfig.getServerConfig());
OwaspZapScan owaspZapScan = resolver.resolveScanImplementation(scanConfig, clientApi);
LOG.info("Starting Owasp Zap scan.");
owaspZapScan.scan();
}
Aggregations