Ignore default before and after_script for Scan Execution Policies
What does this MR do and why?
This MR solves problem when default.before_script or default.after_script is configured in the project and it causes failures for scans enforced by scan execution policies.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Create new project
- Add
gitlab-ci.ymlfile withdefault.before_scriptanddefault.after_scriptset to- exit 1 - Create new Policy (Secure -> Policies -> Create new -> Scan Execution Policy) and select
secret_detectionscan - Run pipeline in your project
-
before_scriptandafter_scriptshould not interrupt execution of the policy
Related to #472663 (closed)
Edited by Alan (Maciej) Paruszewski
