feat: add prompt for resolve_vulnerability
What does this merge request do and why?
Part of gitlab-org/gitlab#482070
How to set up and validate locally
- Setup - If needed, follow the instructions in this MR to set up Resolve Vulnerability with AI in the GDK - gitlab-com/content-sites/handbook!9430 (merged)
- First, in the GDK, ensure the original completion works by ensuring the
ai_gateway_agents
feature flag is disabled and testing Resolve Vulnerability for any supported CWE listed a project's vulnerability report. - Tail the AI Gateway logs with
gdk tail gitlab-ai-gateway
. - The path of the request in the logs should be
path=/v1/proxy/anthropic/v1/messages
if theai_gateway_agents
feature flag is disabled. - In the GitLab Rails project, change to the
resolve-vuln-aigw
branch (Add AIGW service class for resolve_vulnerability (gitlab-org/gitlab!165884)) and restart the GDK. - Next, enable the
ai_gateway_agents
feature flag in the GDK. - Test Resolve Vulnerability for the same CWE you tested previously.
- Tail the AI Gateway logs with
gdk tail gitlab-ai-gateway
. - In the logs, you should see
Initializing prompt registry from local yaml
- The path of the request in the logs should be
path=/v1/prompts/resolve_vulnerability
if theai_gateway_agents
feature flag is disabled.
Merge request checklist
-
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed.
Edited by Darby Frey