Skip to content
Home SAST Tools GitLab SAST
GitLab SAST

GitLab SAST

Category: SAST
License: Included with GitLab (Free tier: limited, Premium/Ultimate: full features)
Suphi Cankurt
Suphi Cankurt
AppSec Enthusiast
Updated February 15, 2026
4 min read
Key Takeaways
  • GitLab SAST runs automatically on every commit in CI/CD pipelines with zero external tool configuration required.
  • Advanced SAST uses multi-core scanning enabled by default, with AI-powered false positive detection on Ultimate with GitLab Duo.
  • Diff-based scanning analyzes only changed code in merge requests for faster feedback during code review.
  • Built on industry-standard analyzers like Semgrep, with automatic merge request generation for vulnerability fixes on Ultimate tier.

GitLab SAST provides built-in static application security testing for GitLab repositories. Unlike external SAST tools that require integration, GitLab SAST runs automatically in your CI/CD pipelines with minimal configuration.

For teams already using GitLab, SAST offers a zero-friction security scanning solution with AI-powered features in Ultimate tier.

What is GitLab SAST?

GitLab SAST scans source code for security vulnerabilities on every commit. According to GitLab’s DevSecOps surveys, organizations that shift security left by integrating scanning into CI/CD pipelines detect vulnerabilities significantly earlier in the development lifecycle.

The system uses analyzer containers — Docker images that wrap third-party scanners like Semgrep — to detect issues across multiple programming languages.

When a scan completes, GitLab displays findings directly in merge requests, security dashboards, and vulnerability reports. Developers see security issues alongside other code review feedback without switching tools or platforms.

GitLab Advanced SAST represents the next generation of GitLab’s scanning technology. It provides faster scanning with multi-core support, more accurate detection, and is gradually replacing the legacy Semgrep-based analyzers for all supported languages.

Zero-Config Scanning
Enable SAST by including a template in .gitlab-ci.yml—no external tools, API keys, or complex configuration required
AI False Positive Detection
GitLab Duo automatically identifies likely false positives in Critical and High severity findings (Ultimate tier)
Automated Fix Generation
Agentic SAST creates merge requests with context-aware code fixes for High and Critical vulnerabilities (Ultimate tier)

Key features

FeatureDetails
Languages (Advanced SAST)C, C++, C#, Go, Java, JavaScript, Python, Ruby, TypeScript
Languages (Standard)Apex, Elixir, Groovy, Kotlin, Objective-C, PHP, Scala, Swift
AnalyzersAdvanced SAST, Semgrep, SpotBugs, Kubesec, PMD Apex, Sobelow
CI templateinclude: template: Jobs/SAST.gitlab-ci.yml
Default excluded pathsspec, test, tests, tmp
Search depth20 (Semgrep), 4 (others)
Runner requirementLinux (Docker or Kubernetes executor, amd64 only)
FIPS supportAvailable via -fips image suffix

Automatic scanning on every commit

GitLab SAST merge request widget showing scan findings

Add GitLab SAST to your project by including the SAST.gitlab-ci.yml template in your .gitlab-ci.yml file. GitLab automatically runs scans on every commit and merge request.

The scanner detects which languages exist in your repository and runs the appropriate analyzers. You don’t configure language-specific settings.

Tier-based feature availability

FeatureFreePremiumUltimate
Basic SAST scanningYesYesYes
JSON report downloadYesYesYes
Advanced SAST engineNoNoYes
MR widget with findingsNoNoYes
Vulnerability managementNoNoYes
Ruleset customizationNoNoYes
AI false positive detectionNoNoYes (Duo add-on)
Agentic fix generationNoNoYes (Duo add-on)

GitLab Advanced SAST

Advanced SAST is GitLab’s proprietary scanning engine with multi-core scanning enabled by default. Enable it with GITLAB_ADVANCED_SAST_ENABLED: "true" in your CI variables.

It currently supports C, C++, C#, Go, Java, JavaScript, Python, Ruby, and TypeScript. Other languages fall back to the Semgrep-based analyzer.

AI-powered false positive detection

For Ultimate tier users with the GitLab Duo add-on, AI analyzes Critical and High severity SAST vulnerabilities to flag likely false positives. Each finding gets a confidence score and explanation, reducing manual triage time.

Agentic SAST vulnerability resolution

Also in Ultimate tier with GitLab Duo, agentic SAST automatically generates merge requests that fix High and Critical severity vulnerabilities. The AI uses multi-shot reasoning to understand code context and create fixes that preserve functionality.

GitLab SAST inline vulnerability indicator in merge request diff view

Vulnerability tracking

GitLab vulnerability report showing project security findings

GitLab tracks vulnerabilities across refactoring. If code moves to a different file or line, the vulnerability follows it rather than creating a duplicate. Vulnerabilities also auto-resolve when their associated rules are disabled.

Offline support
GitLab SAST runs in air-gapped environments with locally-mirrored analyzer images. Configure SECURE_ANALYZERS_PREFIX to point to your internal registry.

Getting started

1
Enable SAST — Add include: - template: Jobs/SAST.gitlab-ci.yml to your .gitlab-ci.yml. Make sure you have a test stage defined.
2
Push a commit — GitLab detects your project languages and runs the right analyzers automatically. No API keys or external tools needed.
3
Review findings — View results in the pipeline Security tab, merge request widget (Ultimate), or download the JSON report artifact.
4
Customize rules — Exclude paths with SAST_EXCLUDED_PATHS, pin analyzer versions with SAST_ANALYZER_IMAGE_TAG, or enable Advanced SAST with GITLAB_ADVANCED_SAST_ENABLED.

When to use GitLab SAST

GitLab SAST is the obvious choice if you’re already on GitLab and want security scanning without adding external tools. The zero-config setup means you can go from nothing to scanning in a single commit.

The real value shows up at the Ultimate tier with GitLab Duo, where AI triage and automatic fix generation cut manual work significantly. Free tier users still get basic scanning and JSON reports, but miss the MR integration and vulnerability management features.

For more customizable scanning outside GitLab, standalone tools like Semgrep or Snyk Code work with any CI/CD system. See our what is SAST guide for a broader overview of static analysis testing.

Best for
Teams using GitLab for source control and CI/CD who want integrated security scanning without managing external tools. Ultimate tier with GitLab Duo provides the most value through AI-powered triage and automated fixes.

Frequently Asked Questions

What is GitLab SAST?
GitLab SAST is built-in static application security testing that runs automatically in GitLab CI/CD pipelines. It scans source code for vulnerabilities on every commit, displays findings in merge requests and security dashboards, and requires no external tool setup or configuration.
What's the difference between GitLab Free and Ultimate SAST features?
GitLab Free includes basic SAST scanning with manual review of findings. Premium adds security dashboards and team features. Ultimate adds AI-powered false positive detection, automatic vulnerability fix generation via merge requests, and GitLab Duo AI features. Advanced SAST with multi-core scanning is available in all tiers.
How does GitLab SAST compare to standalone tools like Semgrep or Snyk Code?
GitLab SAST uses Semgrep CE and other open-source scanners as underlying analyzers, providing comparable detection. The advantage is zero configuration and native integration with GitLab workflows. Standalone tools offer more customization, broader language support, and work with any CI/CD system.
Does GitLab SAST slow down CI pipelines?
GitLab SAST uses diff-based scanning to analyze only changed files in merge requests, reducing scan time. Multi-core scanning (enabled by default in Advanced SAST) further improves performance. Incremental scanning to skip unchanged code is on the 2026 roadmap for additional speedup.