Skip to content

Add explain vulnerability tool

Alex Buijs requested to merge add-explain-vulnerability-tool into master

What does this MR do and why?

Add /explain_vulnerability slash command tool for Duo Chat.

The prompt was taken from the existing Vertex prompt here and can be iterated upon.

Issue: #463541 (closed)

Screenshots or screen recordings

Screenshot_2024-05-26_at_17.47.02

How to set up and validate locally

  1. Setup Duo Chat
  2. Generate test vulnerabilities
  3. Execute the following GraphQL query:
mutation explainVulnerability($agentVersionId: AiAgentVersionID, $clientSubscriptionId: String) {
  aiAction(
    input: {
      chat: {
        resourceId: "gid://gitlab/Vulnerability/1",
        content: "/explain_vulnerability",
        agentVersionId: $agentVersionId,
      },
    	clientSubscriptionId: $clientSubscriptionId
    }
  ) {
    requestId
    errors
    __typename
  }
}
Edited by Alex Buijs

Merge request reports