Skip to content

feat: add LinkVulnerabilityToMergeRequest tool

What does this merge request do and why?

Adds LinkVulnerabilityToMergeRequest tool to agentic chat

Screenshots

Screenshot_2025-09-23_at_9.56.13_AM

How to set up and validate locally

  1. You'll need a project in the gitlab-duo group that has vulnerabilities. You can seed an existing project with the following:
    bin/rake 'gitlab:seed:vulnerabilities[gitlab-duo/<your-project>]'
  2. Visit vulnerability report such as http://127.0.0.1:3000/gitlab-duo/<your-project>/-/security/vulnerability_report to verify that there are vulnerabilities
  3. Get the ID of one of the vulnerabilities in the list. You can copy this from the URL of one of the vulnerability detail pages.
  4. Open a merge request on that same project.
  5. In duo agentic chat for the project, ask the following:
    Can you give me a list of the open MRs for this project?
  6. Duo will give you a list of the open MRs, which will include the MR IID
  7. Ask duo to link the MR to the vulnerability:
    Can you link MR <MR IID> to vulnerability <vulnerability ID>
  8. Verify that Duo uses the correct tool and uses the MR ID (instead of the IID you gave it).
  9. Approve the tool and verify that it succeeds
  10. Go to the vulnerability details page for the vulnerability you linked and verify that the MR shows up in the description.

Merge request checklist

  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.
  • If this change requires executor implementation: verified that issues/MRs exist for both Go executor and Node executor or confirmed that changes are backward-compatible and don't break existing executor functionality.
Edited by Scott Hampton

Merge request reports

Loading