Add virtual preset_key to default profiles

What does this MR do and why?

Introduces preset_key as the identifier for virtual, unpersisted, scan profiles.

Virtual defaults were identified by their scan_type, so a scan type could only ever have one default profile.

ScanProfile now carries a non-persisted preset_key whose reader falls back to scan_type, which keeps the four existing defaults' Global IDs byte-identical, and Security::DefaultScanProfiles centralises lookup behind .all, .find_by_preset_key and .virtual_identifier? instead of the scan-type enum checks the resolvers and the service each derived on their own.

ScanProfilesResolver also dedupes persisted profiles against defaults on scan type and name rather than scan type alone, so persisting one preset no longer hides its siblings.

This is groundwork only, so no new presets and no user-visible change. A follow-up MR adds the triage and remediation presets, with multiple presets for a single scan type.

Changelog: added
EE: true

[Backend] Add Conservative / Standard / Proacti... (#622469 - closed) • Gal Katz • 19.4

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