Skip to content

Multi-core Analysis Support for GitLab Advanced SAST

Multi-core Analysis Support for GitLab Advanced SAST

Background

GitLab Advanced SAST currently performs deep code analysis which provides highly accurate results but leads to increased scan duration. While the improved accuracy is valuable for customers by reducing false positives compared to basic SAST solutions, the longer scan times can be problematic, especially for large monorepos.

Problem Statement

The current single-threaded analysis approach doesn't take advantage of modern multi-core processors, resulting in longer than necessary scan durations.

Proposed Solution

Implement parallel processing capabilities by:

  1. Splitting the main ruleset into multiple smaller rulesets
  2. Running multiple scan processes simultaneously across available CPU cores
  3. Aggregating results from parallel scans into a single report

Expected Benefits

  • Reduced overall scan duration
  • Better resource utilization of modern hardware
  • Maintained high accuracy of results
  • Improved developer experience with faster feedback cycles

Technical Considerations

  • Need to ensure thread-safe operations
  • Proper resource allocation and management
  • Maintaining result consistency across parallel scans
  • Efficient ruleset partitioning strategy