Add due date filter token to the Vulnerability Report

What does this MR do and why?

  • Adds a Due date filtered-search token to the project and group Vulnerability Report, so people can find vulnerabilities that are overdue, due soon, or have no due date.
  • Uses the GraphQL arguments from !266733 (merged). Shown only when vulnerability_due_date_filter is on (checked against the top-level group) and advanced vulnerability management is available, since the filter is Elasticsearch-only.
  • Merge only after the 19.6 cut, so this ships in 19.7. The queries always send the new arguments, so in a zero-downtime upgrade an API node without !266733 (merged) (19.6) would reject them and break the whole report (#639350).

Options, design decisions (signed off by UX and PM) and edge cases are in #638050. Closes #638050.

Screenshots or screen recordings

Verified in GDK against Elasticsearch, on gitlab-org/gitlab and the gitlab-org group, with due dates on six vulnerabilities (today is Oct 30).

State Screenshot
Token options 01_token_options
Project: Due within a week (2 results, counts follow) 02_project_due_within_week
Project: Overdue, loaded from ?dueDate=overdue 03_project_overdue
Project: None (the 4 critical and 2 high with due dates drop out) 04_project_none
Group: Any (all 6) 05_group_any
Flag off: ?dueDate=week is ignored and the token isn't offered 06_flag_off

No browser console errors.

How to set up and validate locally

Requires GDK with Elasticsearch and advanced vulnerability management, and the backfill_due_date_in_vulnerabilities ES migration finished.

  1. Enable the flag for your top-level group:

    Feature.enable(:vulnerability_due_date_filter, Group.find_by_full_path('gitlab-org'))
  2. Set due dates on a few vulnerabilities, some in the past and some in the next week.

  3. Open the project Vulnerability Report (/<project>/-/security/vulnerability_report), add the Due date token, and try each option. The list and the severity counts both update, and the URL gets ?dueDate=<value>.

  4. Repeat on the group Vulnerability Report.

  5. Disable the flag. The token is no longer offered, and ?dueDate= in the URL is ignored.

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.

  • No changelog entry: the feature is behind a default-off flag.

🤖 Generated with Claude Code

Edited by AJ Biton

Merge request reports

Loading
Loading