zaproxy: zap docker stuck after creating CA certificate step.
Describe the bug
We are running zap in docker container. We tried to use various image to diagnose the issue.
Running following command:
zap-x.sh -d -host 0.0.0.0 -port 1001 -config globalexcludeurl.url_list.url.regex='^https?:\/\/.*\/(?:.*ruxitagentjs.*)+$' -config api.disablekey=true -config scanner.attackOnStart=true -config view.mode=attack -config connection.dnsTtlSuccessfulQueries=-1 -config api.addrs.addr.name=.* -config api.addrs.addr.regex=true /dev/null 2>&1 &
Got stuck after this stage.
[ZAP-BootstrapGUI] INFO org.zaproxy.addon.network.ExtensionNetwork - New root CA certificate created.
Steps to reproduce the behavior
docker run -v $(pwd):/zap/wrk:rw -t owasp/zap2docker-weekly /zap/zap-x.sh -d -host 0.0.0.0 -port 1001 -config globalexcludeurl.url_list.url.regex='^https?:\/\/.*\/(?:.*ruxitagentjs.*)+$' -config api.disablekey=true -config scanner.attackOnStart=true -config view.mode=attack -config connection.dnsTtlSuccessfulQueries=-1 -config api.addrs.addr.name=.* -config api.addrs.addr.regex=true
Expected behavior
zaproxy should be accessible on port 1001
Software versions
Docker Version: 20.10.12 java: 11.0.13+8-Ubuntu-0ubuntu1.20.04
Screenshots
No response
Errors from the zap.log file
No response
Additional context
No response
Would you like to help fix this issue?
- Yes
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (9 by maintainers)
The
/dev/null
is being passed as argument to ZAP causing other error, there’s also a dialogue that the user is expected to act upon (i.e. “Do you want to persist the ZAP Session”). If you really want to use the GUI you should pass, e.g.-config database.newsession=3 -config database.newsessionprompt=false
to not have that dialogue, although I’d suggest using daemon mode which doesn’t prompt user dialogues (so ZAP start up is never blocked waiting for user’s actions).@thc202 Thanks a ton and can confirm the above change fixed our issue
@thc202 Full logs from console
@thc202 we tried removing -d but still no luck… and can confirm do have the add-on, example logs from console…
Not sure if the command was not fully pasted, you are starting ZAP with GUI not in daemon mode (
-d
is not a valid argument).