Remove 1 year time bound limitation on vulnerability over time chart

What does this MR do and why?

This MR removes the 1-year time bound limitation on the vulnerability over time chart to address count inaccuracies across various charts and reports.

Context: The ES query on the vulnerabilities over time chart was time bounded for the last 1 year for performance reasons. However, this is causing count inaccuracies as reported in customer feedback (zendesk ticket).

Since the retention policy is not fully enabled and can take a longer time to roll out, we are removing this time bound limit.

Changes:

  • Removed the overriden_created_after method from CountOverTimeFinder that was applying the 1-year limit
  • Updated the execute method to use the actual created_after parameter from search_params instead of the overridden value
  • Updated the spec to reflect that the passed arguments are used directly without override

ES query performance

Details are available in #581319 (comment 2899313830)

How to set up and validate locally

  1. Ensure Elasticsearch is enabled and configured
  2. Create vulnerabilities with various creation dates (including those older than 1 year)
  3. Query the vulnerability over time chart
  4. Verify that vulnerabilities older than 1 year are now included in the results

Local Verification

!213378 (comment 2901431617)

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.

Closes #581319 (closed)

Edited by Bala Kumar

Merge request reports

Loading