[FE] Show the branch or tag in the vulnerability details header

What does this MR do and why?

Shows the branch or tag a vulnerability is tracked on in the Vulnerability Details header, with a branch or tag icon, the same way the Vulnerability Report row does. Screen readers announce "Branch" or "Tag" before the name. Shown when FF vulnerabilities_across_contexts is on (on by default) and the user can read tracked refs. Stacked on !263622 (merged), which adds the data.

Changes

  • The header shows the tracked ref's icon and name right after "Detected … in pipeline …"
  • Screen-reader-only text says whether the ref is a branch or a tag
  • The header's meta line shows even when the tracked ref is its only item
  • The page's query and data adapter now include the tracked ref
  • Updated the related specs

References

Screenshots or screen recordings

# Scenario Before After Result
1 Tracked branch (vac-test) 1 before 1 after Branch icon and name after the detected text
2 Tracked tag (vac-tag-test) 2 before 2 after Tag icon and name
3 No tracked ref 3 before 3 after No change

The default branch shows the same way, with the branch icon. When there are related MRs, the ref sits between the detected text and the MR badge. Screen readers read "Branch" or "Tag" before the name.

How to set up and validate locally

Prerequisites:

  • GDK with advanced search, which the tracked ref filter needs. See Requirements.

Steps:

  1. Use a project with SAST in CI and at least one SAST finding. For example, import https://gitlab.com/gl-demo-ultimate-sming/vac-agentic-security-flows/sast-vr.
  2. Make sure FF vulnerabilities_across_contexts is on. It's on by default.
  3. Create a tag, then track a non-default branch and the tag. See Track an additional context.
  4. Run a pipeline on the branch and on the tag.
  5. Navigate to the Project > Secure > Vulnerability report, filter by the branch, and open a vulnerability. After "Detected … in pipeline …", the header shows the branch icon and the branch name.
  6. Repeat for a vulnerability on the tag. The header shows the tag icon and the tag name.
  7. Open a vulnerability on the default branch. The header shows the default branch name.
  8. In the browser's accessibility tree (for example, Chrome DevTools > Elements > Accessibility), the ref reads "Branch" or "Tag" before the name.
  9. With the flag off, reload the page. The header shows no ref, as before.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Samantha Ming

Merge request reports

Loading
Loading