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

# GitHub fine-grained personal access token (`github_fine_grained_pat`)

> **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.

Fine-grained personal access token of GitHub, limited to selected repositories and permissions: github_pat_ followed by 82 letters, digits and underscores. Classic personal access tokens (ghp_) and GitHub's other token types are in github_token.

- Parent datatype: `github_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`):

```
^github_pat_[A-Za-z0-9_]{82}$
```

## Examples

- `github_pat_ExampleTokenNotReal` (invalid example) — Too short

## Supported by tools

- `gitleaks`
- `trufflehog`

## Sources

- doc: <https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-authentication-to-github>
- other: <https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml>
- other: <https://github.com/trufflesecurity/trufflehog/blob/main/pkg/detectors/github/v2/github.go>

## Quality

Score 70/100. Missing: examples, mapping (Wikidata, Schema.org, ...), translation.

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