Skip to content

Support diff-based scanning in report module

Summary

See MVC: Enable Diff-Based Scanning in MRs for Fast... (&17758 - closed) on how this issue fits in the whole plan.

Also read this thread for context on the changes needed here.

References

Main diff-based scanning epic: Faster Advanced SAST: Diff-based scanning in MRs (&16790 - closed)

MVC implementation epic: MVC: Enable Diff-Based Scanning in MRs for Fast... (&17758 - closed)

Implementation Plan

We're implementing an enum-based partial_scan_mode field that can for now be set to differential and in future incremental which will be implemented in future.

  1. Add the partial_scan_mode field In the report module
    1. Here's a reference commit that identifies where to add this field in the repo.
  2. Update the TransformToGLSASTReport code in sarif.go to take in a partialScan param and use it to create a newReport where the Scan.SASTPartialScan is null(which indicates full scan) or set to differential.
    1. This will be used here in gitlab-advanced-sast to configure the scan type on whether it is a full scan or partial differential scan
Edited by Shao Ming Tan