Commit 4e29cf3a authored by FulcrandG's avatar FulcrandG
Browse files

Adding zaproxy job script

parent 0bed6856
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -37,4 +37,5 @@ use it as a service (we reccomend using our [Docker](https://hub.go2scale.io/job

| Name | Description | Default |
| ---- | ----------- | ------- |
| `VARIABLE` <img width=100/> | A general variable for this job <img width=175/>| `{{ variable }}` <img width=100/>|
| `ZAP_SCANNERS` <img width=100/> | A comma-spearated list of scanners to use <img width=175/>| ` ` <img width=100/>|
| `ZAP_CONTEXT` | Pathfor the context file for authenticated scans | ` ` |
+16 −2
Original line number Diff line number Diff line
@@ -5,6 +5,20 @@ job_name:
    image: owasp/zap2docker-stable:2.9.0
    stage: dynamic_tests
    variables:
      VARIABLE: {{ variable }}
      ZAP_SCANNERS: ""
      ZAP_CONTEXT: ""
    script:
      - echo "${VARIABLE}"
      - if [ ! -z ${ZAP_CONTEXT} ]; then
      -   zap-cli context import ${ZAP_CONTEXT}
      -   if [ ! -z ${ZAP_SCANNERS}]; then
      -     zap-cli quick-scan -s $ {ZAP_SCANNERS} --context-name ${ZAP_CONTEXT} --self-contained --start-options '-config api.disablekey=true' http://app 
      -   else
      -     zap-cli quick-scan --context-name ${ZAP_CONTEXT} --self-contained --start-options '-config api.disablekey=true' http://app
      -   fi
      - else
      -   if [ ! -z ${ZAP_SCANNERS}]; then
      -     zap-cli quick-scan -s $ {ZAP_SCANNERS} --self-contained --start-options '-config api.disablekey=true' http://app 
      -   else
      -     zap-cli quick-scan --self-contained --start-options '-config api.disablekey=true' http://app
      -   fi
      - fi