Add profile scan job name suffix to avoid collision with SEP jobs

What does this MR do and why?

Adds a job_name_suffix option to ScanPipelineService so scan profile jobs can no longer collide with scan execution policy jobs.

Both features build their CI jobs through the same ScanPipelineService, which names jobs <scan-type>-<index>, where the index counts each caller's own action list. When the same scan type lands at the same index in both, the names are identical and because the scan profile processor runs second, its job deep-merges into the policy's, leaving one job carrying the profile's variables and stage instead of two independent jobs.

SecurityScanProfiles::Processor now passes JOB_NAME_SUFFIX = '-profile' through CiConfigurationService into CiAction::Base#generate_job_name_with_index, so profile jobs are named secret-detection-profile-0 instead of secret-detection-0.

Changelog: fixed
EE: true

#611603 (comment 3679248743)

How to set up and validate locally

  1. Create a project. with minimal .py file.
  2. Make sure Auto DevOps is turned off for the project.
  3. Create a scan execution policy with secret detection only for the project.
  4. Attach the default SD profile from the Security configuration page.
  5. Run a pipeline and compare the jobs under the application-security-testing stage:
    • On master: a single job, showing the scan execution policy icon, as the policy and profile jobs merged into one:
      image
    • On this branch: two separate jobs, one for the policy and one for the profile:
      image

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading
Loading