Skip to content

Replace ZAP exit triggers and shutdown with DAST Python

Avielle Wolfe requested to merge replace-exit-triggers into master

What does this MR do?

This MR adds a handover_to_dast hook that executes the ZAP shutdown logic.

  • Adds scripts/make-python-script-substitutions.sh, which is called from the Dockerfile. It edits the ZAP scripts in place to replace the zap_pre_shutdown hook with handover_to_dast. It also adds a rescue from SystemExit to avoid the ZAP scripts throwing an error when handover_to_dast exits before the scripts' bare except statement. Bare except 😡
  • Adds custom handover_to_dast hook and refactors CustomHooks so that handover_to_dast executes the pre-shutdown and system exit code

What are the relevant issue numbers?

gitlab-org/gitlab#218806 (closed)

Does this MR meet the acceptance criteria?

Merge request reports