nullcipher

GitLab personal access tokens (glpat-) and the other GitLab token prefixes

glpat- followed by 20 characters (older tokens) or a longer routable token ending in a dot and 9 characters; deploy (gldt-), runner (glrt-), trigger (glptt-), feed (glft-) and other GitLab prefixes are masked too. Below: the exact rule, a live check, why it matters, and what to do if one already leaked.

Live check: GitLab personal access token

What an AI chat would receive after masking

# EXAMPLE, not a real token
GITLAB_TOKEN=[GITLAB_PAT_1]

1 × GitLab personal access token found and masked.

How nullcipher recognises it

Checked only when the text contains “glpat-” (any case). Pattern (gitleaks rule gitlab-pat, v8.30.1, translated to JavaScript): /glpat-[\w\-]{20}/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 3 bits per character, so repetitive placeholders like xxxx are left alone.

This is the rule text of the “GitLab personal access token” detector in the masking engine, copied from the engine when this page was built; the rule is ported from gitleaks’ default rule set (MIT licence; version, skipped rules and changes). Detectors run in a fixed order and, where two overlap, the earlier one wins.

The same page covers 14 more rules, each with its own placeholder:

GitLab personal access token (routable) — [GITLAB_PAT_ROUTABLE_1]
Checked only when the text contains “glpat-” (any case). Pattern (gitleaks rule gitlab-pat-routable, v8.30.1, translated to JavaScript): /\bglpat-[\-0-9A-Z_a-z]{27,300}\.[0-9a-z]{2}[0-9a-z]{7}\b/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 4 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
GitLab deploy token — [GITLAB_DEPLOY_TOKEN_1]
Checked only when the text contains “gldt-” (any case). Pattern (gitleaks rule gitlab-deploy-token, v8.30.1, translated to JavaScript): /gldt-[\-0-9A-Z_a-z]{20}/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 3 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
GitLab runner authentication token (routable) — [GITLAB_RUNNER_AUTHENTICATION_TOKEN_ROUTABLE_1]
Checked only when the text contains “glrt-” (any case). Pattern (gitleaks rule gitlab-runner-authentication-token-routable, v8.30.1, translated to JavaScript): /\bglrt-t\d_[\-0-9A-Z_a-z]{27,300}\.[0-9a-z]{2}[0-9a-z]{7}\b/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 4 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
GitLab runner authentication token — [GITLAB_RUNNER_AUTHENTICATION_TOKEN_1]
Checked only when the text contains “glrt-” (any case). Pattern (gitleaks rule gitlab-runner-authentication-token, v8.30.1, translated to JavaScript): /glrt-[\-0-9A-Z_a-z]{20}/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 3 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
GitLab runner registration token — [GITLAB_RRT_1]
Checked only when the text contains “gr1348941” (any case). Pattern (gitleaks rule gitlab-rrt, v8.30.1, translated to JavaScript): /GR1348941[\w\-]{20}/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 3 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
GitLab CI/CD job token — [GITLAB_CICD_JOB_TOKEN_1]
Checked only when the text contains “glcbt-” (any case). Pattern (gitleaks rule gitlab-cicd-job-token, v8.30.1, translated to JavaScript): /glcbt-[0-9A-Za-z]{1,5}_[\-0-9A-Z_a-z]{20}/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 3 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
GitLab pipeline trigger token — [GITLAB_PTT_1]
Checked only when the text contains “glptt-” (any case). Pattern (gitleaks rule gitlab-ptt, v8.30.1, translated to JavaScript): /glptt-[0-9a-f]{40}/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 3 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
GitLab feed token — [GITLAB_FEED_TOKEN_1]
Checked only when the text contains “glft-” (any case). Pattern (gitleaks rule gitlab-feed-token, v8.30.1, translated to JavaScript): /glft-[\-0-9A-Z_a-z]{20}/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 3 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
GitLab incoming mail token — [GITLAB_INCOMING_MAIL_TOKEN_1]
Checked only when the text contains “glimt-” (any case). Pattern (gitleaks rule gitlab-incoming-mail-token, v8.30.1, translated to JavaScript): /glimt-[\-0-9A-Z_a-z]{25}/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 3 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
GitLab agent for Kubernetes token — [GITLAB_KUBERNETES_AGENT_TOKEN_1]
Checked only when the text contains “glagent-” (any case). Pattern (gitleaks rule gitlab-kubernetes-agent-token, v8.30.1, translated to JavaScript): /glagent-[\-0-9A-Z_a-z]{50}/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 3 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
GitLab OAuth app secret — [GITLAB_OAUTH_APP_SECRET_1]
Checked only when the text contains “gloas-” (any case). Pattern (gitleaks rule gitlab-oauth-app-secret, v8.30.1, translated to JavaScript): /gloas-[\-0-9A-Z_a-z]{64}/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 3 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
GitLab SCIM token — [GITLAB_SCIM_TOKEN_1]
Checked only when the text contains “glsoat-” (any case). Pattern (gitleaks rule gitlab-scim-token, v8.30.1, translated to JavaScript): /glsoat-[\-0-9A-Z_a-z]{20}/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 3 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
GitLab feature flag client token — [GITLAB_FEATURE_FLAG_CLIENT_TOKEN_1]
Checked only when the text contains “glffct-” (any case). Pattern (gitleaks rule gitlab-feature-flag-client-token, v8.30.1, translated to JavaScript): /glffct-[\-0-9A-Z_a-z]{20}/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 3 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
GitLab session cookie — [GITLAB_SESSION_COOKIE_1]
Checked only when the text contains “_gitlab_session=” (any case). Pattern (gitleaks rule gitlab-session-cookie, v8.30.1, translated to JavaScript): /_gitlab_session=[0-9a-z]{32}/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 3 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)

Example (fake)

# EXAMPLE, not a real token
GITLAB_TOKEN=glpat-EXAMPLEexample000000

nullcipher replaces it with [GITLAB_PAT_1]. The 20 characters after glpat- spell EXAMPLE twice and end in zeros. GitLab never issued it.

Why it matters in an AI chat

GitLab publishes a prefix for each token type: glpat- for personal, project, group and impersonation access tokens, gldt- for deploy tokens, glrt- for runner authentication tokens, glptt- for pipeline trigger tokens, glft- for feed tokens and more. nullcipher masks every one of those prefixes listed in the rules below.

A personal access token acts as you with the scopes it was given; with the api scope it can read and push to every project you can reach and change their settings.

Tokens show up in git remote URLs, CI variables and failed pipeline logs — the text people paste into an AI chat when a job fails.

If it already leaked

  1. Revoke it: select your avatar → Edit profile → Access → Personal access tokens, then the vertical ellipsis next to the token → Revoke, and confirm. GitLab says revoking invalidates the token immediately. [1]
  2. Or rotate it from the same menu (Rotate): GitLab creates a new token with the same permissions and scope, and the original becomes inactive immediately. Tools that use the old token stop working until you give them the new one. [1]
  3. Other token types have their own owners — deploy tokens under the project's repository settings, runner tokens under the runner — and GitLab's token overview lists which prefix belongs to which type, so you can tell what leaked. [2]

Sources

  1. Personal access tokens — GitLab Docs — checked 2026-09-25.
  2. GitLab token overview: token prefixes — GitLab Docs — checked 2026-09-25.

Open the full masking tool to mask a whole log, .env file or e-mail — every type at once — and restore the values in the AI's answer. Or see all 229 detectors, with a page for 46 secret types, and how to delete a chat you already sent.