Hello
I used to automate ZAP in the following way :
1 - According to my project configuration file, I dynamically set up a dast.policy file under the zap/userhome/policies folder.
2 - Still according to my project configuration file, I dynamically set up a dast.context file that enables the proper DB technologies under the zap/userhome/contexts folder.
3- I then start ZAP as follows :
java -jar $zap_jar -daemon -installdir "$zap_path" -dir "$zap_user_home" \
-config connection.timeoutInSecs=120 \
-config api.disablekey=true \
-config pscans.scanOnlyInScope=true \
-config database.request.bodysize=20000000 \
-config database.response.bodysize=20000000 \
-config scanner.attackOnStart=true \
-config view.mode=attack \
-config scanner.attackPolicy='dast' \
-config
api.addrs.addr.name=.* \
-config api.addrs.addr.regex=true \
-host $proxy_host -port $proxy_port &
4 - I then call a piece of Java code that loads the context :
ClientApi api = new ClientApi(getProxyHost(), Integer.parseInt(getProxyPort()), true);
api.context.importContext("dast.context");
5 - I play my selenium tests, then call another piece of Java code that waits for the scanners to terminate and generate the report
Now I want to use the docker stable image but I can't figure out how to set up the policy and context. Is it in the config.yaml, but then can I use both the yaml file and the -config options ?
Thanks for your help.