Commit 9aec7cc4 authored by FulcrandG's avatar FulcrandG
Browse files

zaproxy job with zap-cli without report

parent 0bd5ca3f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -40,3 +40,4 @@ use it as a service (we reccomend using our [Docker](https://hub.go2scale.io/job
| `ZAP_OPTIONS` <img width=100/> | ZAP command line options e.g. `-z "-config aaa=bbb -config ccc=ddd"` <img width=175/>| ` ` <img width=100/>|
| `ZAP_CONTEXT` | Path for the context file for authenticated scans | ` ` |
| `ZAP_TARGET` | Target for zaproxy to scan, default using alias of the docker image used as a service | `http://app` |
| `ZAP_PORT` | Custom port if you have one for your project (zap will try 80/443 by default) | ` ` |
+17 −4
Original line number Diff line number Diff line
@@ -8,18 +8,31 @@ zaproxy:
    ZAP_SCANNERS: ""
    ZAP_CONTEXT: ""
    ZAP_TARGET: "http://app"
    ZAP_PORT: ""
  script:
    - if [ ! -z ${ZAP_CONTEXT} ]; then
    -   zap-cli context import ${ZAP_CONTEXT}
    -   if [ ! -z ${ZAP_SCANNERS}]; then
    -     if [ ! -z ${ZAP_PORT} ]; then
    -       zap-cli -p ${ZAP_PORT} quick-scan -s ${ZAP_SCANNERS} --context-name ${ZAP_CONTEXT} --start-options '-config api.disablekey=true' ${ZAP_TARGET}
    -     else
    -       zap-cli quick-scan -s ${ZAP_SCANNERS} --context-name ${ZAP_CONTEXT} --start-options '-config api.disablekey=true' ${ZAP_TARGET}
    -   else
    -     if [ ! -z ${ZAP_PORT} ]; then
    -       zap-cli -p ${ZAP_PORT} quick-scan --context-name ${ZAP_CONTEXT} --start-options '-config api.disablekey=true' ${ZAP_TARGET}
    -     else
    -       zap-cli quick-scan --context-name ${ZAP_CONTEXT} --start-options '-config api.disablekey=true' ${ZAP_TARGET}
    -   fi
    - else
    -   if [ ! -z ${ZAP_SCANNERS}]; then
    -     if [ ! -z ${ZAP_PORT} ]; then
    -       zap-cli -p ${ZAP_PORT} quick-scan -s $ {ZAP_SCANNERS} --start-options '-config api.disablekey=true' ${ZAP_TARGET} 
    -     else
    -       zap-cli quick-scan -s $ {ZAP_SCANNERS} --start-options '-config api.disablekey=true' ${ZAP_TARGET} 
    -   else
    -     if [ ! -z ${ZAP_PORT} ]; then
    -       zap-cli -p ${ZAP_PORT} quick-scan --start-options '-config api.disablekey=true' ${ZAP_TARGET}
    -     else
    -       zap-cli quick-scan --start-options '-config api.disablekey=true' ${ZAP_TARGET}
    -   fi
    - fi
 No newline at end of file