Add per-scanner KEV filter rendering to policy drawer
What does this MR do and why?
Adds per-scanner KEV (Known Exploited Vulnerabilities) and EPSS score filter rendering in the scan result policy drawer. When the securityPoliciesKevFilter feature flag is enabled and scanners are in object format, the drawer displays per-scanner detail sections showing scanner-specific criteria (severity levels, vulnerability attributes including KEV catalog status and EPSS score).
Related to #576862 (closed)
Changes
Backend/Utils
-
createHumanizedScanners— Updated to handle both string ('sast') and object ({ type: 'sast', ... }) scanner formats -
humanizeVulnerabilityAttributes— Extended to support theknown_exploitedattribute (KEV catalog filter) -
humanizeEpssScore— New helper function to render EPSS score conditions with human-readable operators ("greater than", "less than or equal to", etc.) -
buildScannerDetails— New function that produces per-scanner humanized criteria arrays (severity levels, vulnerability attributes, EPSS score) -
humanizeRule(SCAN_FINDING branch) — Conditionally returnsscannerDetailswhen feature flag is enabled and scanners are objects; clearscriteriaListsince criteria become per-scanner
Frontend/Template
-
details_drawer.vue— Added template block to render per-scanner detail sections withdata-testid="scanner-details"anddata-testid="scanner-detail-item"
Tests
- 5 new unit tests for drawer utils (object scanners, flag disabled, string scanners with flag, known_exploited, epss_score)
- 3 new unit tests for details_drawer component (flag enabled renders scanner details, flag disabled doesn't, string scanners don't)
- 3 new test cases for
createHumanizedScanners(object scanners, mixed, unknown type) - All tests pass: 29/29 drawer utils, 26/26 drawer component, 153/153 editor utils
Visual changes
| Description | UI |
|---|---|
| Drawer with scanner objects |
How to set up and validate locally
- Enable the feature flag:
Feature.enable(:security_policies_kev_filter) - Create a scan result policy with per-scanner KEV/EPSS settings (object-format scanners)
- Open the policy drawer and verify per-scanner details render correctly
- Disable the feature flag and verify the drawer falls back to standard rendering
MR acceptance checklist
- Tests added for new functionality
- Feature flag used for new functionality
- Follows GitLab's Vue.js style guide
-
i18n strings externalized via
s__()andsprintf
Edited by Artur Fedorov