# Docs: https://linear.app/developers/graphql
# Format: lin_api_ prefix followed by 40 alphanumeric characters
# Verify: POST request to Linear GraphQL API with Authorization header
# Prefix: lin_api_
[detector]
id = "linear-api-key"
name = "Linear API Key"
service = "linear"
severity = "high"
keywords = ["lin_api_"]
[[detector.patterns]]
regex = 'lin_api_[a-zA-Z0-9]{40}'
description = "Linear API key (lin_api_ prefix, 40 chars)"
[detector.verify]
method = "POST"
url = "https://api.linear.app/graphql"
[detector.verify.auth]
type = "header"
name = "Authorization"
template = "{{match}}"
[detector.verify.success]
status = 200