Add SAST support to scan profile mapping util and mutations

What does this MR do and why?

Extends the scan profile mapping util and the create/update mutations to support SAST, and shows the Manage profiles button next to SAST in the group Security Configuration scanners table, so the drawer can manage SAST profiles the same way it already manages Secret Detection profiles.

Adds SAST to CONFIGURATION_INPUT_KEYS in map_scan_profile_variables.js so mapScanProfileVariables nests SAST configuration under the sast: key, and adds a matching ... on SastConfiguration fragment to SecurityScanProfileCreate and SecurityScanProfileUpdate. SAST has no unconfigurable trigger types on the backend, so no entry is needed in UNCONFIGURABLE_TRIGGER_TYPES. In group_scanners_overview.vue, canManageProfilesFor now allows both SAST and SECRET_DETECTION, so the button and drawer are no longer Secret Detection only.

Behind the existing custom_scan_profiles_ui feature flag.

References

Screenshots or screen recordings

Before After
Manage profiles for SAST doesn't exist.

How to set up and validate locally

  1. Enable the custom_scan_profiles_ui feature flag.
  2. Go to a group's Security > Configuration page, Scanners tab.
  3. Find the SAST row and click Manage profiles. The drawer opens and lists SAST profiles, same as clicking it for Secret Detection.
  4. Disable the flag and reload. Neither row shows a Manage profiles button.
yarn jest ee/spec/frontend/security_configuration/graphql/scan_profiles/map_scan_profile_variables_spec.js
yarn jest ee/spec/frontend/security_configuration/components/scan_profiles/group_scanners_overview_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.

Edited by Chen Charnolevsky

Merge request reports

Loading
Loading