Connection refused when connecting to http://localhost:8000 in azure pipeline

230 views
Skip to first unread message

Allison Salach

unread,
Aug 29, 2023, 4:00:02 PM8/29/23
to ZAP User Group
Hello,

I'm trying to run a ZAP scan in my Azure Devops pipeline against a version of my site that I spin up at localhost:8000 using the npm package start-server-and-test. My docker commands look like this:

     docker pull softwaresecurityproject/zap-stable    
     docker run -v $(pwd):/zap/wrk/:rw -t softwaresecurityproject/zap-stable zap-baseline.py -t http://$(ip -f inet -o addr show bridge0 | awk '{print $4}' | cut -d '/' -f 1):8000   -x xml_report.xml -I


But when I run it I get the following errors: 

Device "docker0" does not exist.
Using the Automation Framework
Automation plan failures:
Job spider failed to access URL http://:8000 : java.lang.IllegalArgumentException: Host name must not be empty


Can anyone help me? 

Simon Bennetts

unread,
Aug 30, 2023, 3:50:50 AM8/30/23
to ZAP User Group
The clue is in this part: "Job spider failed to access URL http://:8000"
It means that "$(ip -f inet -o addr show bridge0 | awk '{print $4}' | cut -d '/' -f 1)" returned an empty string.
Try testing that part in isolation - theres clearly something wrong with it :)

Cheers,

Simon
Reply all
Reply to author
Forward
0 new messages