Show the prompt for the Explain Vulnerability feature
What does this MR do and why?
On the vulnerability details page, there is an Explain This Vulnerability panel. This MR adds a "Show prompt" clickable item to it that when clicked, will show the AI prompt in a code section.
Collapsed | Loading | Error | Prompt |
---|---|---|---|
How to set up and validate locally
- Enable the feature flag
explain_vulnerability
. - Clone a project that has SAST vulnerabilities, for example https://gitlab.com/gitlab-org/security-products/tests/webgoat.net.
- Run a pipeline for the master branch.
- Go to the vulnerability report. All the results should be SAST results.
- Click on a vulnerability to go to the details page.
- Verify that the "Show prompt" clickable item is shown in the Explain Vulnerability panel. Verify that clicking on it shows the prompt.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #407757 (closed)
Edited by Daniel Tian