Spike: Verify security report comparison logic between Threat Insights and Security Policies after consolidation

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Collaborate/take over this issue

Summary

Currently, groupsecurity insights and groupsecurity policies have their own logic to compare vulnerabilities added/fixed by merge requests which can produce different results and cause confusion for the users. We want to consolidate the logic of comparing security reports for an MR to prevent that.

Given the following git commit graph;

merge_request_pipelines_two_types

Here are the differences between the groups;

  1. Choosing the comparison base pipeline

    • groupsecurity insights is trying to use the latest "merge base pipeline"(pipeline 4 on the graph) if exists. If it does not exist, then it is using the latest "base pipeline"(pipeline 1 on the graph). This logic will be slightly changed by !133118 (merged).
    • groupsecurity policies is taking the latest completed pipeline for the target branch(pipeline 6 on the graph) as a reference and checking the latest completed pipelines with the same ref and sha with that reference pipeline for each security orchestration CI pipeline source.
  2. Using the child pipelines

    • groupsecurity insights is currently using the report artifacts generated by the child pipelines.
    • groupsecurity policies is currently not using the report artifacts generated by the child pipelines. Here is a SPIKE for groupsecurity policies to investigate the performance impact of using the child pipelines.
  3. Data source for the comparison logic

    • groupsecurity insights is using the security report artifacts produced by the security jobs. groupthreat insights has an issue to start using the Security::Finding records.
    • groupsecurity policies is using the Security::Finding records stored in the database.

Improvements

Consolidate the logic of finding the target pipeline and the data source used, to reduce the maintenance cost and prevent inconsistent results between each group's features.

Risks

Involved components

Optional: Intended side effects

Edited Nov 28, 2025 by Christopher Mutua
Assignee Loading
Time tracking Loading