Resolve "Display badge on AI-resolvable items within the MR report"
What does this MR do and why?
This code diff introduces a new feature to the Merge Request widget. It adds a badge to vulnerabilities that can be resolved using AI. This badge is only shown if the user has the ability to resolve vulnerabilities with AI and the vulnerability has AI resolution enabled.
Additionally, the feature flag (`resolve_vulnerability_in_mr) for resolving vulnerabilities in the merge request must be enabled.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Import this project: https://gitlab.com/gitlab-org/govern/threat-insights-demos/verification-projects/cwe-tests
- DO NOT RUN A PIPELINE AGAINST MASTER
- Add a small change, eg. add a README and create a new MR
- Run pipeline
- Reload MR page after pipeline has finished
- Verify that the badges are NOT showing
- Enable the FF:
echo 'Feature.enable(:resolve_vulnerability_in_mr)' | rails c
- Verify that the badges are showing
Related to #482900 (closed)
Edited by David Pisek