java.lang.IllegalArgumentException: Parameter host must not be null.

129 views
Skip to first unread message

Stephan Kaps

unread,
Apr 5, 2017, 10:51:58 AM4/5/17
to BDD-Security
Hi,

I integrated bdd-security into my jenkins build pipeline,
trying to run some tests (http_header) against one of my systems,
so I set the baseUrl in the config.xml,
but the message I get at the step "When the following URLs are visited and their HTTP responses recorded"
is java.lang.IllegalArgumentException: Parameter host must not be null.

Is there any other place where I have to configure something to run a first test?

Stephan Kaps

unread,
Apr 5, 2017, 10:56:34 AM4/5/17
to BDD-Security
this is the complete error message

java.lang.IllegalArgumentException: Parameter host must not be null.
	at net.continuumsecurity.proxy.ZAProxyScanner.validateHost(ZAProxyScanner.java:49)
	at net.continuumsecurity.proxy.ZAProxyScanner.<init>(ZAProxyScanner.java:33)
	at net.continuumsecurity.steps.WebApplicationSteps.getProxy(WebApplicationSteps.java:209)
	at net.continuumsecurity.steps.WebApplicationSteps.clearProxy(WebApplicationSteps.java:204)
	at net.continuumsecurity.steps.WebApplicationSteps.accessSecureBaseUrlAndRecordHTTPResponse(WebApplicationSteps.java:540)
	at ✽.When the following URLs are visited and their HTTP responses recorded(http_headers.feature:7)

Stephen de Vries

unread,
Apr 5, 2017, 11:35:17 AM4/5/17
to BDD-Security
Hi Stephan,

Have you modified the proxy section in the config.xml?  It should be commented out completely if you're using the built in ZAP.

    <!-- Optional location of a running OWASP ZAP instance.  Either an external- already running ZAP instance must be specified here, or the zapPath must be specified to launch ZAP
    <proxy>
        <host>127.0.0.1</host>
        <port>8888</port>
        <api></api>
    </proxy>-->


Stephan Kaps

unread,
Apr 6, 2017, 10:47:17 AM4/6/17
to BDD-Security
yes this section is commented out

Pedro Fernando Marquez Soto

unread,
Sep 27, 2017, 11:17:17 AM9/27/17
to BDD-Security
I was getting this error because I tried to run it in a Windows machine and the scripts for OWASP ZAP are not able to start.

If you run it in Windows, change this property in config.xml:

<zapPath>zap/zap.sh</zapPath>


To this:

<zapPath>zap/zap.bat</zapPath>
Reply all
Reply to author
Forward
0 new messages