Adds backend checks for vulnerability report VR icon
What does this MR do and why?
This MR adds the backend checks needed to enable the frontend logic to display the badge for vulnerabilities that can be resolved with VR on the report page as described in #481558 (closed).
There are two checks needed for the frontend:
- that the
resolve_vulnerability_with_aiability is true (viapush_frontend_ability) - that
aiResolutionAvailableis true for the individual vulnerability record (via GraphQL)
If both are true, the badge should be displayed. If either are false, the badge should not be display.
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
- First check that the ability is being loaded on the report page by navigating to the report page, for example: http://gdk.test:3000/govern-demos/webgoat.net-anthropic/-/security/vulnerability_report and viewing the page source. Ensure that
gon.abilities={"resolveVulnerabilityWithAi":true}is included in the page source. - Next check that the
aiResolutionAvailableattribute is available via GraphQL. In thegraphql-explorerrun this query:
query projectVulnerabilities($fullPath: ID!) {
project(fullPath: $fullPath) {
id
vulnerabilities {
nodes {
id
title
aiResolutionAvailable
}
}
}
}
With the variables:
{
"fullPath": "govern-demos/webgoat.net-anthropic"
}
The aiResolutionAvailable attribute should be included in the response.
Edited by Darby Frey