Skip to main content

GitLab Token

Description​

General​

Revoke the secret​

Tokens can be revoked from the user's dashboard or programmatically.

Check for suspicious activity​

For each personal token, GitLab displays the last used date, under Settings and Access Tokens.

Details for Gitlab token​

  • Family: token

  • Category: version_control_platform

  • Company: GitLab

  • High recall: False

  • Validity check available: True

  • Analyzer available: True

  • On-premise instances exist: True

  • Only valid secrets raise an alert: False

  • Minimum number of matches: 1

  • Occurrences found for one million commits: 5.51

  • Prefixed: False

  • PreValidators:

- type: FilenameBanlistPreValidator
banlist_extensions: []
banlist_filenames: []
check_binaries: false
include_default_banlist_extensions: true
ban_markup: true
- type: ContentWhitelistPreValidator
patterns:
- gitlab

Examples​

- text: |
git+https://gitlab-deploy-token-4:jaiveyYredWX3wixerW-@git.alpha-beta.fr/some/project

apikey: jaiveyYredWX3wixerW-

- text: |
+set GITLAB_TOKEN=u_zx0envC23WEwvCzEKp

apikey: u_zx0envC23WEwvCzEKp

- text: |
+ GitlabrunnerRegistrationToken: "tQgCbx5UPy_ByM2FczhU"
apikey: tQgCbx5UPy_ByM2FczhU

- text: |
$env:GITLAB_TOKEN = "LkaPhTfdsPhdVZaHUGhG"
apikey: LkaPhTfdsPhdVZaHUGhG

Details for Gitlab personal token​

  • Family: token

  • Category: version_control_platform

  • Company: GitLab

  • High recall: False

  • Validity check available: True

  • Analyzer available: True

  • On-premise instances exist: True

  • Only valid secrets raise an alert: True

  • Minimum number of matches: 1

  • Occurrences found for one million commits: 0.08

  • Prefixed: False

  • PreValidators:

- type: FilenameBanlistPreValidator
banlist_extensions: []
banlist_filenames: []
check_binaries: false
include_default_banlist_extensions: true
ban_markup: false
- type: ContentWhitelistPreValidator
patterns:
- gitlab

Examples​

- text: |
'my gitlab token is set below.
I want something that is not handled by the AssignmentRegexMatcher not to interfere
with the gitlab_token detector
"qZ3do4vK3MiSHbE29vAQ"'
apikey: qZ3do4vK3MiSHbE29vAQ
- text: |
'my gitlab token is set below.
I want something that is not handled by the AssignmentRegexMatcher not to interfere
with the gitlab_token detector
"qZ3do4vK3MiSHbE29vAQ"'

apikey: qZ3do4vK3MiSHbE29vAQ

Details for Gitlab personal token v2​

  • Family: token

  • Category: version_control_platform

  • Company: GitLab

  • High recall: True

  • Validity check available: True

  • Analyzer available: True

  • On-premise instances exist: True

  • Only valid secrets raise an alert: False

  • Minimum number of matches: 1

  • Occurrences found for one million commits: 15.16

  • Prefixed: True

  • PreValidators:

- type: ContentWhitelistPreValidator
patterns:
- glpat-

Examples​

- text: |
The prefixed gitlab personal token
glpat-SNixgZ5e6NWeo1Wwga11
apikey: glpat-SNixgZ5e6NWeo1Wwga11

- text: |
glpat-SNixgZZeXNWeoWWwgaef
apikey: glpat-SNixgZZeXNWeoWWwgaef

# Fat-fingered secret
- text: |
gglpat-SNixgZ5e6NWeo1Wwga11
apikey: glpat-SNixgZ5e6NWeo1Wwga11

Secret Analyzer​

Analysis Method​

  • Provider allows scopes enumeration: False
  • Total network call count: 2
  • Total call count may vary: False

HTTP Calls​

Requests are designed to capture metadata and not to function effectively.

  • GET: /api/v4/personal_access_tokens/self
  • GET: /api/v4/projects

Other Calls​

Non-HTTP queries or HTTP calls made through a third-party app (e.g., Python package). No other calls for this analyzer.