What this change means
How responses are judged changed. Changes how the detector verifies or what it treats as the credential.
Scanner deep dive
The GitLab detector looks for a single value in text that resembles a credential. It uses the word “gitlab” to narrow its search.
GitLabVersion ControlDraft: not yet checked by a person
GitLab is a platform for the whole software lifecycle, used by teams and AI agents. Personal access tokens can be created, rotated, and revoked from a user's profile.
Runs on any connection. Triggered by keywords in the content, after decoding.How TruffleHog works
GitLab is a web-based DevOps lifecycle tool that provides a Git repository manager providing wiki, issue-tracking, and CI/CD pipeline features. GitLab API tokens can be used to access and modify repository data and other resources. GitLab Personal Access Tokens (PATs) can be used to authenticate and access GitLab resources.
source code hosting and DevOps. Products: GitLab.com, GitLab self-managed, personal access tokens.
A verified token can call GitLab APIs on that host with whatever scopes the token has. Admin or owner access is unknown from the detector alone.
GET {host}/api/v4/user with Bearer. HTTP 200 and 403 are verified (403 can mean live token without read_user, or a blocked account). 401 is not. This registry does not treat 403 as a dead key.
Provider documentationThe detector changed on Oct 1, 2026, and this context has no recorded review. Check it still matches.
Draft provider notes, not yet checked by a person. Not read from source.
The v1 detector checks decoded text containing “gitlab” for a possible credential.
v1 regexgitlab.go:38 (opens TruffleHog source on GitHub)
\b([a-zA-Z0-9][a-zA-Z0-9\-=_]{19,21})\bMust appear near: “gitlab”
| v1v1/gitlab.go | v2v2/gitlab_v2.go | v3v3/gitlab_v3.go | |
|---|---|---|---|
| Keywords |
|
|
|
| Regexes |
|
|
|
v1 regexgitlab.go:38 (opens TruffleHog source on GitHub)
\b([a-zA-Z0-9][a-zA-Z0-9\-=_]{19,21})\bMust appear near: “gitlab”
What this detector does at each step of the TruffleHog pipeline.
Any one of these in the decoded text wakes the detector.
Verification. When a scan allows it, TruffleHog tests a match by calling the provider. A scan can turn this off for every detector or for this one. Atlas only describes this; it never tests credentials. How the verify decision works
Analyzer.GitLab Analyzer
Each variant checks a found key its own way. Compare their requests and how answers are judged below.
Open Source + Enterprise support detection and verification for this credential type. Edition source.
Not expected to: it’s a GET request, which reads without changing anything, and the source declares no changes.
| v1v1/gitlab.go | v2v2/gitlab_v2.go | v3v3/gitlab_v3.go | |
|---|---|---|---|
| Request | GEThttps://gitlab.com/api/v4/usergitlab.go:129 (opens TruffleHog source on GitHub) | Not tied to this variant’s files in what was read from source. The check may live in a shared file. | Not tied to this variant’s files in what was read from source. The check may live in a shared file. |
| Key is sent as | Bearer tokengitlab.go:134 (opens TruffleHog source on GitHub) | — | — |
| How answers are judged | — | — |
If a result looks wrong, work through these steps. They’re built from the request and status rules above. The Atlas doesn’t send anything.
Each variant checks keys its own way. Use the one that matches your key’s format (see Detection above).
curl -i -H "Authorization: Bearer $API_KEY" "https://gitlab.com/api/v4/user"$API_KEY: the key you're checkingNo check is tied to this variant’s files in what was read from source.
No check is tied to this variant’s files in what was read from source.
Only test keys you own or are allowed to check. Each command is one read-only GET request, the same one TruffleHog makes. Compare the status you get with “How responses are judged” above.
Include the status code and response you got. Never include the key.
The CLI prints verified findings to stdout. Use --json for structured output.
Example scan output · credential redacted
✅ Found verified result 🐷🔑
Detector Type: Gitlab
Decoder Type: PLAIN
Raw result: [redacted]Terminal printer sourceWith --github-actions, GitHub Actions displays this workflow command as a warning on the indicated file and line.
::warning file=config/example.env,line=8,endLine=8::Found verified Gitlab result 🐷🔑GitHub Actions printer sourceLegacy compatibility. --json-legacy writes pre-v3 JSON for Git, GitLab, and GitHub sources only.
When Enterprise verifies that a secret is live, a configured notifier can alert your team. The finding is also available through the Enterprise API.
A notifier that displays rotation guides can include this link with the alert.
Open rotation guideOptional analysis
In Open Source, run trufflehog analyze separately from the scan. Enterprise runs enabled self-discovery analyzers on first discovery of a supported live secret.
Reads scopes from /api/v4/personal_access_tokens/self.
14 permission names in source
Alert delivery has no documented ordering relative to analysis. How Analyze runs.
Use the rotation guide to replace this credential.
TruffleHog’s source looks for 1 token type, by prefix. It doesn’t name them.
| Prefix | Variant |
|---|---|
| glpat- | v2 |
Written in the detector’s source by its authors. Shown as written: this doesn’t say what each page covers.
4 scanners have a confirmed match.
gitlab_access_tokenPush protection yes · Validity check yesbetterleaks.gitlab-patThe rule declares validation, access mapping, revocation.betterleaks.gitlab-pat-routable-versionedThe rule declares validation, access mapping, revocation.1 recorded change since Sep 18, 2026; 1 still needs review.
How responses are judged changed. Changes how the detector verifies or what it treats as the credential.
Facts on this page were read from trufflesecurity/trufflehog at commit 2325546.