Add business_logic to the scan execution policy schema

Why

Business logic scans run only on merge request pipelines, so teams cannot schedule them on a branch.
This lets a scan execution policy declare scan: business_logic on a schedule rule.
Starting the scan comes in Dispatch scheduled business logic scans from sc... (!257271 - merged); until then the action is accepted and skipped.

What changes

  • Both policy schemas accept business_logic.
  • Validation rejects it on non-schedule rules, or where the business logic flow is not available (deployment, flag, license, beta opt-in).
  • Scheduled CI pipelines leave it out, since it runs as a Duo flow, not a CI job.

How to test

In a GDK in GitLab.com mode, with the bl_security_analyzer flag on and the top-level group opted in to beta features:

  1. Save a policy with a schedule rule and scan: business_logic → saved.
  2. Change the rule to pipeline → "Business logic scans can only be used with schedule rules".
  3. Turn off the group's beta features → "Business logic scans are not available for this project or group".
  4. Add scan: secret_detection to the schedule policy and let it run → the pipeline has only the secret detection job.

Verified in a GDK with this MR alone on master.

Context

Edited by Meir Benayoun

Merge request reports

Loading
Loading