Skip to content
Connectors

Scanner deep dive

GitLab

SourceGAOpen source + Enterprise · Hosted or self-hosted

This connector scans repositories in GitLab for credentials and other sensitive data.

Use cases and coverage

Scanning use cases

  • Check a group’s repositories before a handoff

    Select the GitLab projects that are changing owners. Scan the repositories for keys committed in source files or deployment configuration.

  • Locate a credential copied into another project

    Include the team’s maintained repositories and review matches by project and path. Use a separate CI source if the suspected copy was in a build artifact.

Related incidentValid credentials used to access GitLab repositories · Service accessed

May 2019 · Service accessed

GitLab reported unauthorized access to at least 163 repositories. Some were wiped or received ransom notes. GitLab’s investigation suggested the attacker had obtained locally stored passwords.

How this relates to GitLab

GitLab identified repositories accessed with valid credentials. A GitLab source scan can review their contents and history. GitLab did not establish that the passwords came from a commit.

Review GitLab scan scope

GitLab report · Details, May 2019

Source check

Atlas AI-assisted source check · 2026-11-22. The publisher describes the event or study. The Atlas explains its relevance to this connector. Detection depends on the scan scope and detectors in use.

What it covers

Compare in matrix

What the docs page’s Capabilities table says, sorted into what the source reaches, how deep it reads and how it runs. Hatched segments and dashes are capabilities the page doesn’t mention. Select ⓘ for what each one means.

  • repositories

What it reaches

2 supported · 3 not documented

  • Archived repositories✓
  • GitLab Actions✓
  • History–
  • Comments–
  • Attachments–

How deep it reads

3 supported · 1 not documented

  • Archives✓
  • Binaries✓
  • Base64✓
  • Office docs–

How it runs

2 supported · 2 qualified · 2 not documented

  • Filters✓
  • Pre-commitCLI hook
  • Pre-receiveCLI hook
  • Auto-resume✓
  • Real-time–
  • In CI–

Limits

Caveats the docs page states, like size caps or content it skips.

  • Diffs larger than 1 GB are not scanned.
  • For artifacts from GitLab CI pipelines, the docs point to a separate GitLab CI source.

What TruffleHog documents

Integration guide

Use the repository integration for Git history. The guide directs teams reviewing artifacts generated by GitLab CI pipelines to its separate CI scanning instructions.

Read the GitLab integration guide
Open-source CLI

The CLI reads commits in matching projects. A group scan also includes projects shared into the group, so check which projects are visible before sizing the scan.

Read the pinned README passage

Sources checked .

Scan setup and permissions

Set it up

Pick how you’ll run it: each tab has its steps and its options. Enterprise paths come from Truffle’s public docs. The open-source CLI is read from the public TruffleHog code at a pinned commit; it’s a separate product from Enterprise.

Web interface or local configuration

  1. Identify your GitLab instance and the repositories to include. Use the documented read_api access token or service-account credentials.
  2. Provide explicit repositories or apply include/exclude rules. For a self-hosted scanner, also check the Git and package-extraction dependencies.

Suggested contact (Atlas suggestion) · GitLab group owner or instance administrator

Suggested first check (Atlas suggestion) · Check that one intended repository is readable and that the include rules match it.

Setup reference checked 2026-11-22 · Configuration

In the web UI

  1. Personal or project access token with read_api, or basic auth for a service account.

Config file options (7)

Options for sources.GitLab in a local YAML config. Required fields come first.

GitLab configuration options
FieldWhat it doesType
endpointGitLab server URL. Defaults to GitLab Cloud.string
repositoriesExplicit repository names to scan. Omit to enumerate.list
includeReposRepositories to include in org scans; supports * globs.list
ignoreReposRepositories to skip in org scans; supports * globs.list
skipBinariesSkip binary files.boolean
skipArchivesSkip archive files.boolean
clonePathScanner directory where repos are cloned.Default /tmp.string

Check the options in your installed version with trufflehog gitlab --help.

  1. Prepare GITLAB_TOKEN for the scanner and identify the instance endpoint when using a self-hosted GitLab.
  2. Select the intended repository explicitly. With no repository selection, the CLI can enumerate repositories accessible to the credential.

Suggested contact (Atlas suggestion) · GitLab group or project owner

Suggested first check (Atlas suggestion) · Check the pilot repository URL and token reach.

Setup reference checked 2026-11-22 · gitlab command declaration

$ trufflehog gitlab --token=<token>

Find credentials in GitLab repositories. pkg/sources/gitlab · main.go line 154

Open-source TruffleHog, read from the public code at commit ffdee00 (v3.99.9-6-gffdee00a). Newer releases may differ.

All 11 CLI flags1 required
trufflehog gitlab flags
FlagWhat it doesType
--tokenRequiredGitLab token. Can be provided with environment variable GITLAB_TOKEN.string
--endpointGitLab endpoint.Default https://gitlab.com.string
--repoGitLab repo url. You can repeat this flag. Leave empty to scan all repos accessible with provided credential. Example: https://gitlab.com/org/repo.gitstrings
--group-idGitLab group ID. If provided, it will scan the group and its subgroups. You can repeat this flag.strings
--include-pathsPath to file with newline separated regexes for files to include in scan.string
--exclude-pathsPath to file with newline separated regexes for files to exclude in scan.string
--include-reposRepositories to include in an org scan. This can also be a glob pattern. You can repeat this flag. Must use Gitlab repo full name. Example: "trufflesecurity/trufflehog", "trufflesecurity/t*"strings
--exclude-reposRepositories to exclude in an org scan. This can also be a glob pattern. You can repeat this flag. Must use Gitlab repo full name. Example: "trufflesecurity/driftwood", "trufflesecurity/d*"strings
--auth-in-urlEmbed authentication credentials in repository URLs instead of using secure HTTP headersbool
--clone-pathCustom path where the repository should be cloned (default: temp dir).string
--no-cleanupDo not delete cloned repositories after scanning (can only be used with --clone-path). Each clone is kept in its own directory, so ensure sufficient disk space: usage grows with every repository scanned and every run.bool

Access

How the scanner authenticates and what it’s allowed to read. Write access is highlighted.

All read-only, as documented.

Auth methods

  • Access token
  • Basic auth

Permissions

1 permission
  • read_apipersonal or project access token scope

Before you start

  • Git
  • rpm2cpio
  • binutils
  • cpio

If GitLab keys leak

The credentials you give this connector are secrets too. These detectors find GitLab keys anywhere TruffleHog scans, not only inside GitLab.

Recent changes

From TruffleHog’s release notes, after review. Tags show whether each change is in Enterprise, open source, or both.

3 release-note items mention this connector. The Atlas hasn’t checked them yet, so they aren’t listed here. See all release notes

Sources and related tools

Docs OSS codeScraped, not reviewedVersion control systems · CI / CD pipelines

Evidence

Possible issue in Truffle’s docs

  • Notes point to a separate GitLab CI source for pipeline artifacts, but no such page is in the Connect sources index.
  • The Capabilities table has no "Scan history" row, while GitHub's does. Possibly an omission (checked live 2026-11-17).
  • The Capabilities table says "Scan GitLab Actions". GitLab calls these CI/CD pipelines, so the line may be copied from the GitHub page (checked live 2026-11-17).
  • The Capabilities table lists Pre-commit and Pre-receive. These are hooks run with the TruffleHog CLI in a Git workflow, not features of the Enterprise source integration.

Shown here as the docs state it. All docs issues.

Docs scraped 2026-11-17. Each docs page was fetched with Firecrawl twice (an overview pass and a detail pass for capabilities, options, permissions and notes) and read by an extraction prompt. Descriptions are short paraphrases. Open-source CLI facts are parsed from main.go at the pinned TruffleHog commit. Not reviewed by a person. Pinned commit ffdee00. Check the source before quoting a detail, or review this connector so the badge says so.