Skip to content

Short circuit resolve vuln when file missing

What does this MR do and why?

Short circuit resolve vulnerability with AI when source file is missing.

This change causes the resolve vulnerability endpoint to immediately short circuit and return an error if the prompt does not pass the pre-flight check eligible_code?.

Other cases that might cause this

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
image image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Example below:

  1. Ensure you have GDK set up for AI features as pre the handbook instructions note - you do not need to configure GCP vertex or anthropic access for this MR
  2. Clone https://gitlab.com/gitlab-org/govern/threat-insights-demos/verification-projects/verify-432776 to a local group with AI features enabled
  3. Once the master pipeline has completed visit Security -> Vulnerability Report on the project
  4. Click on the Vulnerability
  5. Click 'Resolve with AI'

You should see the error message from the after screenshot above.

Related to #432776 (closed)

Edited by Malcolm Locke

Merge request reports