---
id: "sonarqube_token"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["secrets"]
langs: ["common"]
quality: 78
url: "http://registry.apicrafter.io/datatype/sonarqube_token"
---

# SonarQube token (`sonarqube_token`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Token of SonarQube Server used to run an analysis or call the web API instead of a login and password. Current tokens start with one of the prefixes squ_, sqa_ and sqp_, which depend on the token type (user, global analysis or project analysis token), followed by 40 characters. Older tokens without a prefix are not covered by the regexp.

- Parent datatype: `access_token`
- Personal data (PII): no
- Categories: Secrets and credentials (passwords, keys, tokens) (secrets)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^sq[uap]_[A-Za-z0-9=_-]{40}$
```

## Examples

- `squ_example0example0example0example0example0` — Constructed, non-functional value
- `example0example0example0example0example0` (invalid example) — No type prefix

## Supported by tools

- `gitleaks`
- `semgrep`
- `trufflehog`

## Sources

- doc: <https://docs.sonarsource.com/sonarqube-server/latest/user-guide/managing-tokens/>
- doc: <https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-partner-SonarQubeToken.html>
- other: <https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml>

## Quality

Score 78/100. Missing: second example, mapping (Wikidata, Schema.org, ...), translation.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/sonarqube_token.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/secrets/sonarqube_token.yaml>
