Add support for atomic scanner rule criteria in MR approval policies
What does this MR do and why?
- Add support for atomic scanner rule criteria in approval policies, allowing per-scanner overrides of vulnerability_attributes, severity_levels, vulnerabilities_allowed, and vulnerability_states
- Introduce ScannerConfig PORO and consolidate scanner parsing logic into the existing Rule PORO
- Update JSON schemas (security_orchestration_policy.json, approval_policy_rule_content.json) to accept scanners as either legacy strings or scanner_with_attributes objects via
oneOf
Policy YAML
This change is fully backward compatible and non-breaking. The existing legacy string format for scanners (e.g., scanners: [sast, dependency_scanning]) continues to work exactly as before. The new object format (e.g., scanners: [{type: sast, severity_levels: [critical]}]) is additive and opt-in. Mixed formats are also supported — string and object scanners can coexist in the same array. When the atomic_scanner_rule_criteria feature flag is disabled (default), all scanners fall back to rule-level attributes regardless of format, preserving current behavior. When enabled, per-scanner attributes take precedence with rule-level values as fallbacks
| Before | After |
|---|---|
rules: |
rules: |
Changes
This is split into 3 MRs:
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
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 #584704