Gate triage profiles behind a feature flag

What does this MR do and why?

Gate triage profiles behind a feature flag

Add the triage_and_remediation_profiles_ui wip flag and push it from
the project and group security configuration controllers and the
inventory controller, keyed on the top-level group. Add
isScanProfileTypeVisible to the scan profile utils and use it in the
four places that list profiles: the project page, the scanner wizard,
the inventory bulk table and the group overview.

Add the Automated Triage and Remediation category to
SCAN_PROFILE_CATEGORIES, so triage shows on the project page and the
inventory bulk table when the flag is on. The inventory bulk table
reads its triage name and label from that category. The group overview
and the scanner wizard skip triage either way for now.

Gate behind the triage_and_remediation_profiles_ui feature flag

Related to https://gitlab.com/gitlab-org/gitlab/-/issues/631414

References

Screenshots or screen recordings

Before (or flag off) After (flag on)
Bulk scanners drawer before-bulk-drawer shows automated triage and remediation in the list
after-flag-on-bulk-drawer
Bulk scanners drawer, triage picker open shows the three presets in the dropdown, defaults to Standard
after-flag-on-bulk-drawer-picker
Project scan profiles before-project-config shows automated triage and remediation in the list, the three presets in the dropdown, defaults to Standard
after-flag-on-project-config
Group scanners overview no change, does not show automated triage and remediation
after-flag-on-group-config
Enable scanners wizard no change, does not show automated triage and remediation
after-flag-on-wizard

How to set up and validate locally

  1. git checkout 631414-add-triage-profile-flag-and-visibility-check
  2. enable the triage_and_remediation_profile feature flag (in caproni or gdk)
  3. have a GitLab Ultimate licence
  4. go to a group => Secure => Security inventory, select some projects, and open the bulk scanners drawer
  5. check that there is no Automated Triage and Remediation row
  6. enable the triage_and_remediation_profiles_ui feature flag (in caproni or gdk)
  7. reload and open the drawer again, then check that:
    • there is an Automated Triage and Remediation row
    • its picker shows Triage and Remediation (Standard) selected
    • opening the picker lists the Conservative, Proactive and Standard presets
    • the other scanner rows show the same default profiles as in step 4
  8. go to a project => Secure => Security configuration, and check that:
    • the scan profile table has an Automated Triage and Remediation row showing Triage and Remediation (Standard)
    • with the flag disabled again, the row is gone
  9. with the flag enabled, go to the group => Secure => Security configuration, and check that:
    • the scanners overview has no triage row
    • the enable scanners wizard does not list triage

to run tests

yarn jest ee/spec/frontend/security_configuration/components ee/spec/frontend/security_inventory/components/bulk_scanner_profile_configuration_spec.js

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.

Related to #631414

Edited by Miranda Fluharty

Merge request reports

Loading
Loading