Replace ZAP exit triggers and shutdown with DAST Python
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 thezap_pre_shutdown
hook withhandover_to_dast
. It also adds a rescue fromSystemExit
to avoid the ZAP scripts throwing an error whenhandover_to_dast
exits before the scripts' bareexcept
statement. Bareexcept
😡 - Adds custom
handover_to_dast
hook and refactorsCustomHooks
so thathandover_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?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Job definition example -
Vendored CI Templates (also in CE)
-
-
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer