Loading jobs/zaproxy/zaproxy.yml +17 −6 Original line number Diff line number Diff line Loading @@ -8,19 +8,30 @@ zaproxy: ZAP_SCANNERS: "" ZAP_CONTEXT: "" ZAP_TARGET: "http://app" ZAP_REPORT: "zap-report.xml" script: - echo "test" > ${CI_PROJECT_DIR}/test - zap-cli start --start-options '-config api.disablekey=true' - if [ ! -z ${ZAP_CONTEXT} ]; then - zap-cli context import ${ZAP_CONTEXT} - zap-cli open-url ${ZAP_TARGET} - zap-cli spider ${ZAP_TARGET} - if [ ! -z ${ZAP_SCANNERS}]; then - zap-cli quick-scan -sc -s ${ZAP_SCANNERS} --context-name ${ZAP_CONTEXT} --start-options '-config api.disablekey=true' ${ZAP_TARGET} - zap-cli active-scan --recursive -s ${ZAP_SCANNERS} --context-name ${ZAP_CONTEXT} ${ZAP_TARGET} - else - zap-cli quick-scan -sc --context-name ${ZAP_CONTEXT} --start-options '-config api.disablekey=true' ${ZAP_TARGET} - zap-cli active-scan --recursive --context-name ${ZAP_CONTEXT} ${ZAP_TARGET} - fi - else - zap-cli open-url ${ZAP_TARGET} - zap-cli spider ${ZAP_TARGET} - if [ ! -z ${ZAP_SCANNERS}]; then - zap-cli quick-scan -sc -s $ {ZAP_SCANNERS} --start-options '-config api.disablekey=true' ${ZAP_TARGET} - zap-cli active-scan --recursive -s $ {ZAP_SCANNERS} ${ZAP_TARGET} - else - zap-cli quick-scan -sc --start-options '-config api.disablekey=true' ${ZAP_TARGET} - zap-cli active-scan --recursive ${ZAP_TARGET} - fi - fi - zap report -o ${CI_PROJECT_DIR}/${ZAP_REPORT} -f xml artifacts: paths: - "${ZAP_REPORT}" expire_in: 30 days when: always No newline at end of file Loading
jobs/zaproxy/zaproxy.yml +17 −6 Original line number Diff line number Diff line Loading @@ -8,19 +8,30 @@ zaproxy: ZAP_SCANNERS: "" ZAP_CONTEXT: "" ZAP_TARGET: "http://app" ZAP_REPORT: "zap-report.xml" script: - echo "test" > ${CI_PROJECT_DIR}/test - zap-cli start --start-options '-config api.disablekey=true' - if [ ! -z ${ZAP_CONTEXT} ]; then - zap-cli context import ${ZAP_CONTEXT} - zap-cli open-url ${ZAP_TARGET} - zap-cli spider ${ZAP_TARGET} - if [ ! -z ${ZAP_SCANNERS}]; then - zap-cli quick-scan -sc -s ${ZAP_SCANNERS} --context-name ${ZAP_CONTEXT} --start-options '-config api.disablekey=true' ${ZAP_TARGET} - zap-cli active-scan --recursive -s ${ZAP_SCANNERS} --context-name ${ZAP_CONTEXT} ${ZAP_TARGET} - else - zap-cli quick-scan -sc --context-name ${ZAP_CONTEXT} --start-options '-config api.disablekey=true' ${ZAP_TARGET} - zap-cli active-scan --recursive --context-name ${ZAP_CONTEXT} ${ZAP_TARGET} - fi - else - zap-cli open-url ${ZAP_TARGET} - zap-cli spider ${ZAP_TARGET} - if [ ! -z ${ZAP_SCANNERS}]; then - zap-cli quick-scan -sc -s $ {ZAP_SCANNERS} --start-options '-config api.disablekey=true' ${ZAP_TARGET} - zap-cli active-scan --recursive -s $ {ZAP_SCANNERS} ${ZAP_TARGET} - else - zap-cli quick-scan -sc --start-options '-config api.disablekey=true' ${ZAP_TARGET} - zap-cli active-scan --recursive ${ZAP_TARGET} - fi - fi - zap report -o ${CI_PROJECT_DIR}/${ZAP_REPORT} -f xml artifacts: paths: - "${ZAP_REPORT}" expire_in: 30 days when: always No newline at end of file