Linear API Key
Detects Linear personal API keys (lin_api_ followed by 40 alphanumeric characters) and Linear OAuth access tokens (lin_oauth_ followed by 40-64 alphanumeric characters). A leaked key grants GraphQL API access to issues, roadmaps, security bug reports, and customer attachments in the Linear workspace.
- Type
- regex
- Engine
- boost_regex
- Confidence
- high
- Confidence justification
- High confidence: Linear prefixes all personal keys with lin_api_ and fixed 40-character alphanumeric entropy, pinned identically by Linear 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_-])(lin_api_[A-Za-z0-9]{40}|lin_oauth_[A-Za-z0-9]{40,64})(?![A-Za-z0-9_-])
Corroborative evidence keywords
linear, LINEAR_API_KEY, api.linear.app, linear.app, 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
LINEAR_API_KEY=lin_api_short12345— Body shorter than 40 charactersLINEAR_API_KEY=LIN_API_short12345— Uppercase LIN_API_ prefix and short body rejectedGenerate a Linear API key in Workspace Settings -> Security & Access.— Documentation prose without a key valuetemplate example placeholder record identifier— Template/sample context should be excluded even when anchor words are present
Known false positives
- Revoked Linear developer keys in historic scripts. Mitigation: Verify active keys under Linear Settings -> API.
- Synthetic lin_api_ fixtures in GraphQL client tests. Mitigation: Excluded on every tier by template-exclusion.
References
- Linear Developers GraphQL API authentication (lin_api_ personal API keys and OAuth2)
- gitleaks linear-api-key rule (lin_api_[0-9a-zA-Z]{40})