skip to content

On GitLab Free, which built-in security scanners can a project run, and what does moving to Ultimate add?

level: middleimportance: must knowfreq 40%

answer

  1. detection everywhere, management on Ultimate
  2. Semgrep behind SAST
  3. Trivy behind container scanning
  4. JSON artifact versus merge request report

basics

~20 s

Free runs SAST (Semgrep-based), pipeline secret detection, container scanning (built on Trivy) and IaC scanning, with results only as JSON job artifacts. Ultimate adds dependency scanning, DAST, secret push protection, merge request reports, the vulnerability report and security policies.

solid answer

~40 s

A scanner is turned on by including its CI/CD template, such as `Jobs/SAST.gitlab-ci.yml`, `Jobs/Secret-Detection.gitlab-ci.yml` or `Jobs/Container-Scanning.gitlab-ci.yml`, or by letting the **Security configuration** page prepare a merge request that adds it. On every tier, SAST runs the Semgrep-based analyzer with GitLab-managed rules, container scanning runs Trivy against the image named in `CS_IMAGE`, and pipeline secret detection runs as the `secret_detection` job; each writes a JSON report you can download. Ultimate turns those results into managed data: new findings in the merge request, the pipeline **Security** tab, the vulnerability report with triage, and security policies. It also adds GitLab Advanced SAST, SAST ruleset customization, dependency scanning, browser-based DAST and secret push protection. A Free team therefore gets detection but no enforcement, and must read the artifacts itself.

go deeper

for a junior

Know which scanners exist (SAST, secret detection, container, dependency, DAST) and that SAST, secret detection and container scanning run on every tier.

for a middle

Name the engines (Semgrep-based SAST, Trivy for containers, the SBOM-based dependency analyzer) and explain the split: Free produces artifacts, Ultimate manages and enforces results.

for a senior

Explain why a pipeline full of findings stays green, and where enforcement really comes from. Plan which scanners each tier justifies and who reads results on Free.

for a principal

Frame the licence decision around enforcement and triage effort rather than scanner count, since the cheapest scanners already run on Free.

## Turning a scanner on GitLab's security scanners are ordinary CI/CD jobs. Each one is packaged as a **CI/CD template**, and a project runs it by including that template in its `.gitlab-ci.yml`: ```yaml include: - template: Jobs/SAST.gitlab-ci.yml - template: Jobs/Secret-Detection.gitlab-ci.yml - template: Jobs/Container-Scanning.gitlab-ci.yml ``` There are other ways to get the same jobs: - The project's **Security configuration** page can prepare a merge request that adds a scanner's template for you. It works best when the project has little or no existing CI/CD configuration. - **Auto DevOps** enables most scanners with default settings in one switch, at the cost of customization. - On Ultimate, a **scan execution policy** can force scanners into every project a security team covers. The SAST, secret detection and container scanning jobs need a Linux runner on amd64 with the Docker or Kubernetes executor (GitLab-hosted runners on GitLab.com qualify) and a `test` stage in the pipeline. The **Security configuration** page reports a scanner as **Enabled** only when its report artifact appears in the latest pipeline on the default branch. ## What runs behind each scanner | Scanner | What runs | Tier | |---|---|---| | SAST | Semgrep-based analyzer with GitLab-managed rules | Free, Premium, Ultimate | | GitLab Advanced SAST | Cross-file, cross-function analyzer | Ultimate | | Pipeline secret detection | The `secret_detection` job, scanning commits after a push | Free, Premium, Ultimate | | Container scanning | Trivy, scanning the image in `CS_IMAGE` | Free, Premium, Ultimate | | IaC scanning | Infrastructure definition analyzer | Free, Premium, Ultimate | | Dependency scanning | The SBOM-based analyzer (`Jobs/Dependency-Scanning.v2.gitlab-ci.yml`) | Ultimate | | DAST | Browser-based DAST analyzer against a running application | Ultimate | | Secret push protection | A check on every push, before GitLab accepts it | Ultimate | Two consequences follow. SAST, secret detection and container scanning are free to run everywhere, so there is little reason not to. Dependency scanning and DAST are Ultimate products, so a Free project needs to look elsewhere for those checks or accept not having them. ## What Free and Premium actually get On Free and Premium, the scanners run fully. What is missing is everything that happens to the results afterwards: - Each job publishes a **JSON report artifact**, such as `gl-sast-report.json`, which you can download. - Analyzer behaviour can be customized with CI/CD variables. - Container scanning on Free matches only time-delayed advisory content; Ultimate gets the latest advisory data. - There is no merge request security report, no pipeline **Security** tab with finding details, and no vulnerability report. - Nothing remembers a decision. A finding that a developer judged harmless last week appears again in this week's artifact, because triage statuses and dismissal reasons live in the vulnerability report. - Nothing compares branches, so telling a new problem from an old one means diffing two JSON files by hand. ## What Ultimate adds - **Merge request reports**: new and fixed findings for each change, plus inline SAST annotations. - **The vulnerability report**: default-branch vulnerabilities with statuses, dismissal reasons and history. - **Security policies**: scan execution, merge request approval and vulnerability management policies. - **Scanner extras**: UI-based SAST configuration, SAST ruleset customization, GitLab Advanced SAST and container scanning remediation suggestions. ## A behaviour that surprises teams Finding a vulnerability does not fail the job. GitLab's scanner jobs pass whenever they complete a scan (coverage fuzzing is the one documented exception), and all of them are permitted to fail, so even a broken scanner does not fail the pipeline. GitLab warns against changing their `allow_failure` setting, because that fails the entire pipeline. In practice: 1. On Free, a critical finding produces a green pipeline and a JSON file that somebody has to read. 2. On Ultimate, the finding appears in the merge request, but it still does not block the merge by itself. 3. Blocking on findings is the job of a **merge request approval policy**, which is Ultimate. ## Choosing what to run 1. Include SAST, pipeline secret detection and container scanning on every tier. They cost runner minutes, not licences. 2. On Free, decide who reads the artifacts. Without that, the scans are noise. 3. On Ultimate, add dependency scanning and secret push protection early, since they cover vulnerable dependencies and leaked credentials, which Free projects could not check before. 4. Add DAST only where a deployed test environment exists, because it attacks a running application.

  • On GitLab, the Security configuration page shows SAST as Not enabled although the template is included. Why?
    The page checks the latest pipeline on the default branch for the scanner's report artifact. If that pipeline has not run since the include was merged, or the SAST job did not produce an artifact (for example, no supported files were found), the page says Not enabled. Run a default-branch pipeline and check the job's artifacts.
  • Why does GitLab warn against setting allow_failure: false on its scanner jobs?
    Scanner jobs are permitted to fail so that a broken or missing scan never fails the whole pipeline. Changing that setting makes any scanner hiccup fail the pipeline, and it still does not turn findings into failures, because a scan that completes passes. Use a merge request approval policy to act on findings.

  • GitLab security scanning needs Ultimate, so Free projects cannot run SAST at all.
  • Dependency scanning is free on every GitLab tier, like SAST.
  • A GitLab SAST job fails the pipeline when it finds a critical vulnerability.
  • GitLab container scanning uses Semgrep to inspect image layers.
  • Premium shows findings in the merge request; only policies need Ultimate.