PlanetScale Database Password and Service Token
Detects PlanetScale database branch passwords (pscale_pw_), organization service tokens (pscale_tkn_), and OAuth tokens (pscale_oauth_) followed by 32 to 64 token characters. Leaked credentials grant direct MySQL/Vitess database access or PlanetScale branch and schema management.
- Type
- regex
- Engine
- boost_regex
- Confidence
- high
- Confidence justification
- High confidence: PlanetScale prefixes every generated database password and API token with pscale_pw_, pscale_tkn_, or pscale_oauth_ and >=32 characters of entropy, pinned by PlanetScale docs, GitHub secret scanning, gitleaks, and TruffleHog.
- Jurisdictions
- global
- Regulations
- Criminal Code Act 1995 (Cth)
- Frameworks
- CIS Controls, ISO 27001, NIST CSF, SOC 2
- Data categories
- credentials, security
- Scope
- narrow
- Risk rating
- 8
- Platform compatibility
- Purview: Compatible, GCP DLP: Unsupported, Macie: Unsupported, Zscaler: Compatible, CrowdStrike DLP: Unsupported, Palo Alto: Unsupported, Netskope: Unsupported
Pattern
(?-i)(?<![A-Za-z0-9_.-])(pscale_(?:pw|tkn|oauth)_[A-Za-z0-9_.-]{32,64})(?![A-Za-z0-9_.-])
Corroborative evidence keywords
planetscale, pscale, aws.connect.psdb.cloud, DATABASE_URL, api key, api_key, apikey, access key, access token, auth token, authorization, bearer, conn str, connection string, connectionstring, cookie, credential, database, host, [object Object] (+37 more)
Proximity: 300 characters
Should not match
PLANETSCALE_SERVICE_TOKEN=pscale_pw_short12345— Secret body shorter than 32 charactersPLANETSCALE_SERVICE_TOKEN=pscale_key_short12345— Invalid segment pscale_key_ (not pw, tkn, or oauth)Create a PlanetScale password in the branch connect dialog.— Documentation prose without a token valuetemplate example placeholder record identifier— Template/sample context should be excluded even when anchor words are present
Known false positives
- Deleted development-branch passwords from temporary schema previews. Mitigation: Check active branch passwords and service tokens in the PlanetScale console.
- Example pscale_pw_ strings in ORM quickstart tutorials. Mitigation: Excluded on every tier by template-exclusion.
References
- PlanetScale Service Tokens and connection strings documentation (pscale_tkn_ and pscale_pw_)
- gitleaks planetscale-password / planetscale-api-token rules