Add advanced configuration variable modal and header

What does this MR do and why?

Adds an Advanced configuration section to the scan profile create/edit form (and the read-only profile detail view) below the scan triggers list, visible whenever at least one trigger is enabled. The section header and one-line subtext match the styling of the Scan triggers section, and an Add variable button opens a modal titled by scan type (for example, "Add SAST variable" or "Add secret detection variable"). When none of the enabled triggers support configuration (for example, only Secret Detection's Push event), the section still shows but Add variable is disabled with a tooltip explaining why.

The modal includes a searchable GlCollapsibleListbox to select which CI/CD variable to add, showing each variable's label, env var name as a badge, and description. The variable catalog (variableDefinitionsFor) is currently an empty stub, so the picker has nothing to display. This is expected — value-entry fields and the real per-scan-type catalog land together in the next MR in the stack, since neither can be tested until the catalog is populated.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Enable the feature flag on a Rails console: Feature.enable(:custom_scan_profiles_ui).
  2. Open the group's Security Configuration page and click Manage profiles on the Secret Detection row.
  3. Create a new profile or edit an existing one, and enable at least one configurable trigger (Merge request pipeline or Default branch pipeline; for Secret Detection, Push event does not support configuration).
  4. Confirm the Advanced configuration section appears below Scan triggers, with matching heading and subtext styling.
  5. Click Add variable. A modal opens titled for the profile's scan type, with a searchable picker.
  6. The picker shows no options and the message "All available variables are already configured." This is expected: the real catalog lands in the next MR.
  7. Disable the configurable triggers (Merge request pipeline and Default branch pipeline), keeping only Push event enabled for the Secret Detection profile. The Advanced configuration section remains visible, but the Add variable button is now disabled with a tooltip explaining that a configurable trigger must be enabled to add a variable.
  8. Close the edit form and view the saved profile's detail view to confirm the Advanced configuration section is still visible in the read-only view.

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.

Edited by Chen Charnolevsky

Merge request reports

Loading
Loading