Files
semsec/hardcoded-secrets.yaml
Mohammed Fathy 521800cb45 Update license metadata to MIT across all rules
Aligns rule metadata with the MIT LICENSE file. Changes
"All rights reserved" to "MIT - For the open-source community"
across all 262 rules in 13 files.

Closes #6
2026-11-25 23:16:33 +02:00

2242 lines
70 KiB
YAML

# ============================================================================
# Robusta Studio - Hardcoded Secrets & API Keys Detection Rules
# Copyright (c) 2026 Robusta Studio. All rights reserved.
#
# Precision rules for detecting leaked credentials, API keys, tokens,
# private keys, and other secrets hardcoded in source code.
# High-precision patterns targeting specific provider key formats.
#
# Usage: semgrep --config hardcoded-secrets.yaml /path/to/project
# ============================================================================
rules:
# -- AWS Access Keys -------------------------------------------------------
- id: robusta-secrets-aws-access-key
patterns:
- pattern-regex: (?:AKIA|ABIA|ACCA|ASIA)[0-9A-Z]{16}
paths:
exclude:
- "*.md"
- "*.txt"
- "*.lock"
message: >
AWS Access Key ID detected (starts with AKIA/ABIA/ACCA/ASIA followed by
16 alphanumeric characters). Rotate immediately via IAM console and use
environment variables or AWS Secrets Manager instead.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
references:
- https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html
provider: AWS
severity: ERROR
languages: [generic]
- id: robusta-secrets-aws-secret-key
patterns:
- pattern-regex: (?i)(?:aws_secret_access_key|aws_secret_key|secret_access_key)\s*[:=]\s*['"]?([A-Za-z0-9/+=]{40})['"]?
paths:
exclude:
- "*.md"
- "*.lock"
message: >
AWS Secret Access Key detected (40-character base64 string assigned to a
known AWS key variable). Rotate via IAM and store in environment variables
or AWS Secrets Manager.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: AWS
severity: ERROR
languages: [generic]
# -- Google Cloud / GCP ---------------------------------------------------
- id: robusta-secrets-gcp-api-key
patterns:
- pattern-regex: AIza[0-9A-Za-z\-_]{35}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Google Cloud API key detected (AIza prefix + 35 characters). Restrict the
key's scope in the GCP Console and use Application Default Credentials or
Secret Manager for server-side code.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: GCP
severity: ERROR
languages: [generic]
- id: robusta-secrets-gcp-service-account
patterns:
- pattern-regex: \"type\"\s*:\s*\"service_account\"
paths:
exclude:
- "*.md"
- "*.lock"
message: >
GCP service account JSON key file committed to repository. These contain
a private key that grants full service account permissions. Remove from
repo, rotate the key in IAM, and use Workload Identity Federation instead.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: GCP
severity: ERROR
languages: [generic]
# -- GitHub Tokens ---------------------------------------------------------
- id: robusta-secrets-github-pat
patterns:
- pattern-regex: gh[pousr]_[A-Za-z0-9_]{36,255}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
GitHub Personal Access Token detected (ghp_/gho_/ghu_/ghs_/ghr_ prefix).
Revoke at github.com/settings/tokens and use GITHUB_TOKEN in CI or
environment variables for local dev.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: GitHub
severity: ERROR
languages: [generic]
- id: robusta-secrets-github-fine-grained-pat
patterns:
- pattern-regex: github_pat_[A-Za-z0-9_]{82,}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
GitHub fine-grained Personal Access Token detected. Revoke immediately
at github.com/settings/tokens and use repository-scoped tokens with
minimal permissions.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: GitHub
severity: ERROR
languages: [generic]
# -- GitLab Tokens ---------------------------------------------------------
- id: robusta-secrets-gitlab-token
patterns:
- pattern-regex: glpat-[A-Za-z0-9\-_]{20,}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
GitLab Personal Access Token detected (glpat- prefix). Revoke in
GitLab user settings and use CI_JOB_TOKEN or deploy tokens with
minimal scope instead.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: GitLab
severity: ERROR
languages: [generic]
# -- Slack Tokens ----------------------------------------------------------
- id: robusta-secrets-slack-token
patterns:
- pattern-regex: xox[baprs]-[0-9]{10,13}-[0-9A-Za-z\-]{20,}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Slack API token detected (xoxb-/xoxa-/xoxp-/xoxr-/xoxs- prefix).
Revoke in Slack app settings and store tokens in a secrets manager.
Bot tokens (xoxb-) can read messages and act as the app.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Slack
severity: ERROR
languages: [generic]
- id: robusta-secrets-slack-webhook
patterns:
- pattern-regex: https://hooks\.slack\.com/services/T[A-Z0-9]{8,}/B[A-Z0-9]{8,}/[A-Za-z0-9]{24,}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Slack Incoming Webhook URL detected. Anyone with this URL can post
messages to the linked channel. Remove from code and configure via
environment variable.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: MEDIUM
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Slack
severity: WARNING
languages: [generic]
# -- Stripe Keys -----------------------------------------------------------
- id: robusta-secrets-stripe-secret-key
patterns:
- pattern-regex: sk_live_[0-9a-zA-Z]{24,}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Stripe live secret key detected (sk_live_ prefix). This key can create
charges, refunds, and access customer data. Rotate immediately in the
Stripe Dashboard and use restricted keys with minimal permissions.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Stripe
severity: ERROR
languages: [generic]
- id: robusta-secrets-stripe-restricted-key
patterns:
- pattern-regex: rk_live_[0-9a-zA-Z]{24,}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Stripe live restricted key detected (rk_live_ prefix). Rotate in
Stripe Dashboard and store in environment variables or a secrets manager.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Stripe
severity: ERROR
languages: [generic]
# -- Twilio ----------------------------------------------------------------
- id: robusta-secrets-twilio-api-key
patterns:
- pattern-regex: SK[0-9a-fA-F]{32}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Twilio API Key detected (SK prefix + 32 hex characters). Revoke in
Twilio Console and use environment variables. Twilio keys can send
SMS, make calls, and access account resources.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: MEDIUM
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Twilio
severity: ERROR
languages: [generic]
# -- SendGrid --------------------------------------------------------------
- id: robusta-secrets-sendgrid-api-key
patterns:
- pattern-regex: SG\.[A-Za-z0-9\-_]{22,}\.[A-Za-z0-9\-_]{22,}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
SendGrid API key detected (SG.xxx.xxx format). Revoke in SendGrid
Settings > API Keys and use environment variables. Leaked keys allow
sending emails as your domain (phishing risk).
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: SendGrid
severity: ERROR
languages: [generic]
# -- Mailgun ---------------------------------------------------------------
- id: robusta-secrets-mailgun-api-key
patterns:
- pattern-regex: key-[0-9a-zA-Z]{32}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Mailgun API key detected (key- prefix + 32 alphanumeric characters).
Rotate in Mailgun dashboard and store in environment variables.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: MEDIUM
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Mailgun
severity: WARNING
languages: [generic]
# -- Private Keys ----------------------------------------------------------
- id: robusta-secrets-private-key-rsa
patterns:
- pattern-regex: "-----BEGIN RSA PRIVATE KEY-----"
paths:
exclude:
- "*.md"
- "*.lock"
message: >
RSA private key detected in source code. Private keys must never be
committed. Remove from repo history with git-filter-repo, rotate the
key pair, and store private keys in a vault or HSM.
metadata:
cwe: ["CWE-321"]
owasp: ["A02:2021 Cryptographic Failures"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
severity: ERROR
languages: [generic]
- id: robusta-secrets-private-key-ec
patterns:
- pattern-regex: "-----BEGIN EC PRIVATE KEY-----"
paths:
exclude:
- "*.md"
- "*.lock"
message: >
EC private key detected in source code. Remove from repo, rotate the key
pair, and use a secrets manager or HSM for key storage.
metadata:
cwe: ["CWE-321"]
owasp: ["A02:2021 Cryptographic Failures"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
severity: ERROR
languages: [generic]
- id: robusta-secrets-private-key-openssh
patterns:
- pattern-regex: "-----BEGIN OPENSSH PRIVATE KEY-----"
paths:
exclude:
- "*.md"
- "*.lock"
message: >
OpenSSH private key detected in source code. This grants SSH access to
any server trusting the corresponding public key. Remove, rotate, and
use ssh-agent or a vault for key management.
metadata:
cwe: ["CWE-321"]
owasp: ["A02:2021 Cryptographic Failures"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
severity: ERROR
languages: [generic]
- id: robusta-secrets-private-key-pkcs8
patterns:
- pattern-regex: "-----BEGIN PRIVATE KEY-----"
paths:
exclude:
- "*.md"
- "*.lock"
message: >
PKCS#8 private key detected in source code. Remove from repo history,
rotate the key, and store in a vault or HSM.
metadata:
cwe: ["CWE-321"]
owasp: ["A02:2021 Cryptographic Failures"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
severity: ERROR
languages: [generic]
# -- Heroku ----------------------------------------------------------------
- id: robusta-secrets-heroku-api-key
patterns:
- pattern-regex: (?i)(?:heroku_api_key|heroku_api_token|heroku_oauth_token)\s*[:=]\s*['"]?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}['"]?
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Heroku API key detected (UUID format assigned to a Heroku variable).
Regenerate at dashboard.heroku.com and use Heroku config vars for
deployment credentials.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Heroku
severity: ERROR
languages: [generic]
# -- npm / PyPI Tokens -----------------------------------------------------
- id: robusta-secrets-npm-token
patterns:
- pattern-regex: npm_[A-Za-z0-9]{36,}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
npm access token detected (npm_ prefix). Revoke at npmjs.com/settings
and use CIDR-scoped automation tokens for CI/CD. A leaked token allows
publishing malicious packages under your account (supply chain attack).
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: npm
severity: ERROR
languages: [generic]
- id: robusta-secrets-pypi-token
patterns:
- pattern-regex: pypi-[A-Za-z0-9\-_]{50,}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
PyPI API token detected (pypi- prefix). Revoke at pypi.org/manage/account
and use project-scoped tokens. A leaked token allows uploading malicious
packages (supply chain attack).
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: PyPI
severity: ERROR
languages: [generic]
# -- Azure -----------------------------------------------------------------
- id: robusta-secrets-azure-storage-key
patterns:
- pattern-regex: (?i)(?:DefaultEndpointsProtocol|AccountKey)\s*=\s*[A-Za-z0-9+/=]{44,}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Azure Storage connection string or account key detected. Rotate the key
in the Azure Portal and use Managed Identity or Azure Key Vault references
instead of embedding keys in code.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Azure
severity: ERROR
languages: [generic]
# -- OpenAI / AI Provider Keys ---------------------------------------------
- id: robusta-secrets-openai-api-key
patterns:
- pattern-regex: sk-[A-Za-z0-9]{20}T3BlbkFJ[A-Za-z0-9]{20}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
OpenAI API key detected (sk-...T3BlbkFJ... format). Revoke at
platform.openai.com/api-keys. Leaked keys incur charges on your account
and may expose fine-tuned model data.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: OpenAI
severity: ERROR
languages: [generic]
- id: robusta-secrets-openai-project-key
patterns:
- pattern-regex: sk-proj-[A-Za-z0-9\-_]{80,}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
OpenAI project API key detected (sk-proj- prefix). Revoke at
platform.openai.com and use environment variables for API access.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: OpenAI
severity: ERROR
languages: [generic]
# -- Shopify ---------------------------------------------------------------
- id: robusta-secrets-shopify-token
patterns:
- pattern-regex: shpat_[A-Fa-f0-9]{32}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Shopify Admin API access token detected (shpat_ prefix). Revoke in
Shopify Partners dashboard. Leaked tokens can read/modify store data
including customer PII and orders.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Shopify
severity: ERROR
languages: [generic]
# -- Database Connection Strings -------------------------------------------
- id: robusta-secrets-database-url
patterns:
- pattern-regex: (?i)(?:mysql|postgres|postgresql|mongodb|mongodb\+srv|redis|amqp|mssql)://[^:\s]+:[^@\s]+@[^\s'"]+
paths:
exclude:
- "*.md"
- "*.lock"
- "*.example"
- "*.sample"
message: >
Database connection string with embedded credentials detected. Extract
the username and password into environment variables or a secrets manager.
Connection strings with credentials grant direct database access.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
severity: ERROR
languages: [generic]
# -- Generic Password Assignment -------------------------------------------
- id: robusta-secrets-generic-password-assignment
patterns:
- pattern-regex: (?i)(?:password|passwd|pwd|secret|token|api_key|apikey|api_secret|access_token|auth_token|credentials|private_key)\s*[:=]\s*['"][^\s'"]{8,}['"]
- pattern-not-regex: (?i)(?:password|passwd|pwd|secret|token|api_key|apikey|api_secret|access_token|auth_token|credentials|private_key)\s*[:=]\s*['"](?:\$\{|%s|{{|<|os\.environ|process\.env|ENV\[|getenv|placeholder|example|changeme|your[_-]|REPLACE|TODO|FIXME|xxx|test|dummy|fake|mock|sample)
paths:
exclude:
- "*test*"
- "*spec*"
- "*mock*"
- "*fixture*"
- "*.md"
- "*.lock"
- "*.example"
- "*.sample"
- "*.template"
message: >
Hardcoded credential detected in a password/secret/token variable
assignment. Use environment variables, a .env file (gitignored), or a
secrets manager. Never commit real credentials to source control.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: MEDIUM
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
severity: WARNING
languages: [generic]
# -- JWT Secrets in Code ---------------------------------------------------
- id: robusta-secrets-jwt-secret-generic
patterns:
- pattern-regex: (?i)(?:jwt_secret|jwt_key|jwt_signing_key|token_secret)\s*[:=]\s*['"][A-Za-z0-9+/=\-_]{16,}['"]
paths:
exclude:
- "*test*"
- "*spec*"
- "*.md"
- "*.lock"
- "*.example"
message: >
Hardcoded JWT signing secret detected. If this is a symmetric HMAC key,
anyone with it can forge valid tokens. Store in a secrets manager and
consider asymmetric RS256/ES256 keys stored in a vault.
metadata:
cwe: ["CWE-321"]
owasp: ["A02:2021 Cryptographic Failures"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
severity: ERROR
languages: [generic]
# -- .env Files Committed --------------------------------------------------
- id: robusta-secrets-dotenv-committed
patterns:
- pattern-regex: (?i)^(?:DATABASE_URL|DB_PASSWORD|SECRET_KEY|API_KEY|AWS_SECRET|STRIPE_SECRET|PRIVATE_KEY|AUTH_TOKEN|OAUTH_SECRET)\s*=\s*\S+
paths:
include:
- ".env"
- ".env.production"
- ".env.local"
- ".env.staging"
message: >
Secrets detected in a .env file that appears to be tracked by version
control. Add .env* to .gitignore and use .env.example with placeholder
values instead. Rotate any secrets that were committed.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
severity: ERROR
languages: [generic]
# -- Firebase / Google Firebase --------------------------------------------
- id: robusta-secrets-firebase-url
patterns:
- pattern-regex: (?i)(?:firebase_api_key|firebase_token)\s*[:=]\s*['"][A-Za-z0-9\-_]{20,}['"]
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Firebase credential detected in source code. While Firebase API keys
are semi-public, server keys and admin tokens must be kept secret.
Use Firebase Admin SDK with service account credentials from environment.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: MEDIUM
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Firebase
severity: WARNING
languages: [generic]
# -- Telegram Bot Token ----------------------------------------------------
- id: robusta-secrets-telegram-bot-token
patterns:
- pattern-regex: "[0-9]{8,10}:[A-Za-z0-9_-]{35}"
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Telegram Bot API token detected (numeric bot ID : alphanumeric secret).
Revoke via BotFather /revoke command and store the token in environment
variables.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: MEDIUM
impact: MEDIUM
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Telegram
severity: WARNING
languages: [generic]
# -- Discord Bot Token -----------------------------------------------------
- id: robusta-secrets-discord-bot-token
patterns:
- pattern-regex: "[MN][A-Za-z0-9]{23,}\\.[A-Za-z0-9_-]{6}\\.[A-Za-z0-9_-]{27,}"
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Discord bot token detected. Regenerate in Discord Developer Portal and
store in environment variables. A leaked token gives full control of
the bot account.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: MEDIUM
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Discord
severity: ERROR
languages: [generic]
# -- Docker Registry Credentials -------------------------------------------
- id: robusta-secrets-docker-auth
patterns:
- pattern-regex: (?i)(?:docker_password|docker_auth|dockerhub_password|registry_password)\s*[:=]\s*['"][^\s'"]{8,}['"]
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Docker registry credential detected. Use docker credential helpers
(docker-credential-pass, docker-credential-ecr-login) or CI/CD
secrets instead of hardcoding registry passwords.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Docker
severity: ERROR
languages: [generic]
# -- Hashicorp Vault Token -------------------------------------------------
- id: robusta-secrets-vault-token
patterns:
- pattern-regex: hvs\.[A-Za-z0-9]{24,}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
HashiCorp Vault service token detected (hvs. prefix). Revoke with
`vault token revoke` and use AppRole or Kubernetes auth method instead
of hardcoded tokens.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: HashiCorp
severity: ERROR
languages: [generic]
# -- Supabase --------------------------------------------------------------
- id: robusta-secrets-supabase-service-key
patterns:
- pattern-regex: (?i)(?:supabase_service_role_key|service_role_key)\s*[:=]\s*['"]eyJ[A-Za-z0-9\-_]+\.eyJ[A-Za-z0-9\-_]+\.[A-Za-z0-9\-_]+['"]
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Supabase service role key (JWT) detected. This key bypasses Row Level
Security and grants full database access. Use the anon key client-side
and store the service key in environment variables server-side.
metadata:
cwe: ["CWE-798"]
owasp: ["A07:2021 Identification and Authentication Failures"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Supabase
severity: ERROR
languages: [generic]
- id: robusta-secrets-supabase-token
patterns:
- pattern-regex: sbp_[a-z0-9]{40}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Supabase management API token detected (sbp_ prefix). Revoke in
Supabase dashboard and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Supabase
severity: ERROR
languages: [generic]
# -- Anthropic -------------------------------------------------------------
- id: robusta-secrets-anthropic-api-key
patterns:
- pattern-regex: sk-ant-(?:admin01|api03)-[A-Za-z0-9_\-]{93}AA
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Anthropic API key detected (sk-ant- prefix). Revoke at console.anthropic.com
and use environment variables. Leaked keys incur charges on your account.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Anthropic
severity: ERROR
languages: [generic]
# -- Groq ------------------------------------------------------------------
- id: robusta-secrets-groq-api-key
patterns:
- pattern-regex: gsk_[a-zA-Z0-9]{52}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Groq API key detected (gsk_ prefix). Revoke at console.groq.com and
use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Groq
severity: ERROR
languages: [generic]
# -- xAI -------------------------------------------------------------------
- id: robusta-secrets-xai-api-key
patterns:
- pattern-regex: xai-[0-9a-zA-Z_]{80}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
xAI (Grok) API key detected (xai- prefix). Revoke and store in
environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: xAI
severity: ERROR
languages: [generic]
# -- OpenRouter ------------------------------------------------------------
- id: robusta-secrets-openrouter-api-key
patterns:
- pattern-regex: sk-or-v1-[0-9a-f]{64}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
OpenRouter API key detected (sk-or-v1- prefix). Revoke at
openrouter.ai/keys and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: OpenRouter
severity: ERROR
languages: [generic]
# -- HuggingFace -----------------------------------------------------------
- id: robusta-secrets-huggingface-token
patterns:
- pattern-regex: hf_[a-zA-Z0-9]{34}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
HuggingFace API token detected (hf_ prefix). Revoke at
huggingface.co/settings/tokens and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: HuggingFace
severity: ERROR
languages: [generic]
# -- Replicate -------------------------------------------------------------
- id: robusta-secrets-replicate-api-key
patterns:
- pattern-regex: r8_[0-9A-Za-z_\-]{37}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Replicate API token detected (r8_ prefix). Revoke at replicate.com/account
and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Replicate
severity: ERROR
languages: [generic]
# -- NVIDIA ----------------------------------------------------------------
- id: robusta-secrets-nvidia-api-key
patterns:
- pattern-regex: nvapi-[a-zA-Z0-9_\-]{64}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
NVIDIA API key detected (nvapi- prefix). Revoke at build.nvidia.com
and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: NVIDIA
severity: ERROR
languages: [generic]
# -- Fireworks AI ----------------------------------------------------------
- id: robusta-secrets-fireworks-api-key
patterns:
- pattern-regex: fw_[a-zA-Z0-9]{20,40}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Fireworks AI API key detected (fw_ prefix). Revoke in Fireworks console
and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Fireworks
severity: ERROR
languages: [generic]
# -- Pinecone --------------------------------------------------------------
- id: robusta-secrets-pinecone-api-key
patterns:
- pattern-regex: pcsk_[A-Za-z0-9]{5,6}_[A-Za-z0-9]{63}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Pinecone API key detected (pcsk_ prefix). Revoke at app.pinecone.io
and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Pinecone
severity: ERROR
languages: [generic]
# -- LangSmith / LangFuse -------------------------------------------------
- id: robusta-secrets-langsmith-api-key
patterns:
- pattern-regex: lsv2_(?:pt|sk)_[a-f0-9]{32}_[a-f0-9]{10}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
LangSmith API key detected (lsv2_ prefix). Revoke in LangSmith settings
and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: LangSmith
severity: ERROR
languages: [generic]
# -- ElevenLabs ------------------------------------------------------------
- id: robusta-secrets-elevenlabs-api-key
patterns:
- pattern-regex: (?i)(?:elevenlabs_api_key|eleven_labs_api_key|xi_api_key)\s*[:=]\s*['"][a-f0-9]{32}['"]
paths:
exclude:
- "*.md"
- "*.lock"
message: >
ElevenLabs API key detected. Revoke and regenerate in your ElevenLabs
account settings.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: MEDIUM
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: ElevenLabs
severity: ERROR
languages: [generic]
# -- Cloudflare ------------------------------------------------------------
- id: robusta-secrets-cloudflare-api-token
patterns:
- pattern-regex: cf[ua]t_[a-zA-Z0-9]{40}[a-f0-9]{8}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Cloudflare API Token detected (cfut_/cfat_ prefix). Revoke in
Cloudflare Dashboard > My Profile > API Tokens and use scoped tokens
with minimal permissions.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Cloudflare
severity: ERROR
languages: [generic]
# -- Databricks ------------------------------------------------------------
- id: robusta-secrets-databricks-token
patterns:
- pattern-regex: dapi[0-9a-f]{32}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Databricks personal access token detected (dapi prefix). Revoke in
Databricks workspace settings and use service principals instead.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Databricks
severity: ERROR
languages: [generic]
# -- DigitalOcean ----------------------------------------------------------
- id: robusta-secrets-digitalocean-token
patterns:
- pattern-regex: (?:dop|doo|dor)_v1_[a-f0-9]{64}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
DigitalOcean API token detected (dop_v1_/doo_v1_/dor_v1_ prefix).
Revoke at cloud.digitalocean.com/account/api/tokens.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: DigitalOcean
severity: ERROR
languages: [generic]
# -- Grafana ---------------------------------------------------------------
- id: robusta-secrets-grafana-cloud-token
patterns:
- pattern-regex: glc_eyJ[A-Za-z0-9+/=]{60,160}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Grafana Cloud API token detected (glc_eyJ prefix). Revoke in Grafana
Cloud dashboard and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Grafana
severity: ERROR
languages: [generic]
- id: robusta-secrets-grafana-service-account
patterns:
- pattern-regex: glsa_[0-9a-zA-Z_]{41}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Grafana Service Account token detected (glsa_ prefix). Revoke in
Grafana admin settings.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Grafana
severity: ERROR
languages: [generic]
# -- Doppler ---------------------------------------------------------------
- id: robusta-secrets-doppler-token
patterns:
- pattern-regex: dp\.(?:ct|pt|st|sa|scim|audit)\.[a-zA-Z0-9]{40,44}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Doppler service token detected (dp.pt./dp.ct./dp.st. prefix). Revoke
in Doppler dashboard. These tokens grant access to secrets stored in
Doppler projects.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Doppler
severity: ERROR
languages: [generic]
# -- Infisical -------------------------------------------------------------
- id: robusta-secrets-infisical-token
patterns:
- pattern-regex: st\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.[0-9a-f]{32}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Infisical service token detected. Revoke in Infisical dashboard and use
machine identity authentication instead.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Infisical
severity: ERROR
languages: [generic]
# -- Notion ----------------------------------------------------------------
- id: robusta-secrets-notion-token
patterns:
- pattern-regex: secret_[A-Za-z0-9]{43}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Notion integration secret detected (secret_ prefix). Revoke at
notion.so/my-integrations and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: MEDIUM
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Notion
severity: ERROR
languages: [generic]
# -- Linear ----------------------------------------------------------------
- id: robusta-secrets-linear-api-key
patterns:
- pattern-regex: lin_api_[0-9A-Za-z]{40}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Linear API key detected (lin_api_ prefix). Revoke in Linear settings
and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: MEDIUM
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Linear
severity: ERROR
languages: [generic]
# -- PostHog ---------------------------------------------------------------
- id: robusta-secrets-posthog-api-key
patterns:
- pattern-regex: phx_[a-zA-Z0-9_]{43,48}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
PostHog personal API key detected (phx_ prefix). Revoke in PostHog
settings and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: MEDIUM
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: PostHog
severity: ERROR
languages: [generic]
# -- LaunchDarkly ----------------------------------------------------------
- id: robusta-secrets-launchdarkly-key
patterns:
- pattern-regex: (?:api|sdk)-[a-z0-9]{8}-[a-z0-9]{4}-4[a-z0-9]{3}-[a-z0-9]{4}-[a-z0-9]{12}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
LaunchDarkly SDK/API key detected. Server-side SDK keys grant read access
to all feature flags. Use client-side keys where possible and store
server keys in environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: LaunchDarkly
severity: ERROR
languages: [generic]
# -- Pulumi ----------------------------------------------------------------
- id: robusta-secrets-pulumi-token
patterns:
- pattern-regex: pul-[a-z0-9]{40}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Pulumi access token detected (pul- prefix). Revoke at app.pulumi.com
and use environment variables. This token can manage cloud infrastructure.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Pulumi
severity: ERROR
languages: [generic]
# -- Prefect ---------------------------------------------------------------
- id: robusta-secrets-prefect-api-key
patterns:
- pattern-regex: pnu_[a-zA-Z0-9]{36}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Prefect Cloud API key detected (pnu_ prefix). Revoke in Prefect Cloud
settings and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Prefect
severity: ERROR
languages: [generic]
# -- Resend ----------------------------------------------------------------
- id: robusta-secrets-resend-api-key
patterns:
- pattern-regex: re_[1-9A-HJ-NP-Za-km-z]{8}_[1-9A-HJ-NP-Za-km-z]{24}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Resend API key detected (re_ prefix). Revoke at resend.com/api-keys
and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Resend
severity: ERROR
languages: [generic]
# -- Tailscale -------------------------------------------------------------
- id: robusta-secrets-tailscale-key
patterns:
- pattern-regex: tskey-[a-z]+-[0-9A-Za-z_]+-[0-9A-Za-z_]+
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Tailscale auth/API key detected (tskey- prefix). Revoke in Tailscale
admin console. Auth keys can add devices to your tailnet.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Tailscale
severity: ERROR
languages: [generic]
# -- Terraform Cloud -------------------------------------------------------
- id: robusta-secrets-terraform-cloud-token
patterns:
- pattern-regex: "[A-Za-z0-9]{14}\\.atlasv1\\.[A-Za-z0-9]{67}"
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Terraform Cloud personal token detected (.atlasv1. format). Revoke in
Terraform Cloud user settings. This token can manage infrastructure state
and trigger runs.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Terraform
severity: ERROR
languages: [generic]
# -- Deno Deploy -----------------------------------------------------------
- id: robusta-secrets-deno-deploy-token
patterns:
- pattern-regex: dd[pw]_[a-zA-Z0-9]{36}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Deno Deploy token detected (ddp_/ddw_ prefix). Revoke in Deno Deploy
dashboard and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Deno
severity: ERROR
languages: [generic]
# -- New Relic -------------------------------------------------------------
- id: robusta-secrets-newrelic-user-key
patterns:
- pattern-regex: NRAK-[A-Z0-9]{27}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
New Relic User API Key detected (NRAK- prefix). Revoke in New Relic
account settings and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: NewRelic
severity: ERROR
languages: [generic]
# -- Sentry ----------------------------------------------------------------
- id: robusta-secrets-sentry-org-token
patterns:
- pattern-regex: sntrys_eyJ[a-zA-Z0-9=_+/]{197}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Sentry organization auth token detected (sntrys_eyJ prefix). Revoke
in Sentry organization settings and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Sentry
severity: ERROR
languages: [generic]
# -- Sourcegraph -----------------------------------------------------------
- id: robusta-secrets-sourcegraph-token
patterns:
- pattern-regex: sgp_[a-fA-F0-9]{16}_[a-fA-F0-9]{40}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Sourcegraph access token detected (sgp_ prefix). Revoke in Sourcegraph
user settings.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: MEDIUM
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Sourcegraph
severity: ERROR
languages: [generic]
# -- Postman ---------------------------------------------------------------
- id: robusta-secrets-postman-api-key
patterns:
- pattern-regex: PMAK-[a-zA-Z0-9\-]{59}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Postman API key detected (PMAK- prefix). Revoke in Postman account
settings. This key can access your Postman collections and workspaces.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: MEDIUM
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Postman
severity: ERROR
languages: [generic]
# -- GitLab OAuth2 ---------------------------------------------------------
- id: robusta-secrets-gitlab-oauth2
patterns:
- pattern-regex: gloas-[0-9a-f]{64}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
GitLab OAuth2 access token detected (gloas- prefix). Revoke in
GitLab application settings.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: GitLab
severity: ERROR
languages: [generic]
# -- Contentful ------------------------------------------------------------
- id: robusta-secrets-contentful-pat
patterns:
- pattern-regex: CFPAT-[a-zA-Z0-9_\-]{43}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Contentful Personal Access Token detected (CFPAT- prefix). Revoke at
app.contentful.com and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: MEDIUM
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Contentful
severity: ERROR
languages: [generic]
# -- PlanetScale -----------------------------------------------------------
- id: robusta-secrets-planetscale-password
patterns:
- pattern-regex: pscale_pw_[A-Za-z0-9_]{43}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
PlanetScale database password detected (pscale_pw_ prefix). Revoke
in PlanetScale dashboard and use connection string environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: PlanetScale
severity: ERROR
languages: [generic]
- id: robusta-secrets-planetscale-token
patterns:
- pattern-regex: pscale_tkn_[A-Za-z0-9_]{43}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
PlanetScale API token detected (pscale_tkn_ prefix). Revoke in
PlanetScale dashboard.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: PlanetScale
severity: ERROR
languages: [generic]
# -- Mapbox ----------------------------------------------------------------
- id: robusta-secrets-mapbox-secret-key
patterns:
- pattern-regex: sk\.[a-zA-Z0-9\-_.]{80,240}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Mapbox secret access token detected (sk. prefix). Revoke at
account.mapbox.com and use public tokens for client-side code.
metadata:
cwe: ["CWE-798"]
confidence: MEDIUM
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Mapbox
severity: ERROR
languages: [generic]
# -- Mailchimp -------------------------------------------------------------
- id: robusta-secrets-mailchimp-api-key
patterns:
- pattern-regex: "[0-9a-f]{32}-us[0-9]{1,2}"
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Mailchimp API key detected (hex-us{datacenter} format). Revoke at
mailchimp.com/account/api and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Mailchimp
severity: ERROR
languages: [generic]
# -- Flutterwave -----------------------------------------------------------
- id: robusta-secrets-flutterwave-secret-key
patterns:
- pattern-regex: FLWSECK-[0-9a-z]{32}-X
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Flutterwave secret key detected (FLWSECK- prefix). Revoke in Flutterwave
dashboard. This key can initiate payments and access transaction data.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Flutterwave
severity: ERROR
languages: [generic]
# -- Paystack --------------------------------------------------------------
- id: robusta-secrets-paystack-secret-key
patterns:
- pattern-regex: sk_[a-z]+_[A-Za-z0-9]{40}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Paystack secret key detected (sk_live_/sk_test_ prefix). Revoke in
Paystack dashboard. This key can initiate charges and access customer data.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Paystack
severity: ERROR
languages: [generic]
# -- Razorpay --------------------------------------------------------------
- id: robusta-secrets-razorpay-key
patterns:
- pattern-regex: rzp_live_[A-Za-z0-9]{14}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Razorpay live key detected (rzp_live_ prefix). Rotate in Razorpay
dashboard and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Razorpay
severity: ERROR
languages: [generic]
# -- GoCardless ------------------------------------------------------------
- id: robusta-secrets-gocardless-token
patterns:
- pattern-regex: live_[0-9A-Za-z_\-]{40}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
GoCardless live access token detected. Revoke in GoCardless dashboard.
metadata:
cwe: ["CWE-798"]
confidence: MEDIUM
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: GoCardless
severity: ERROR
languages: [generic]
# -- Square ----------------------------------------------------------------
- id: robusta-secrets-square-access-token
patterns:
- pattern-regex: EAAA[a-zA-Z0-9_\-+=]{60}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Square access token detected (EAAA prefix). Revoke in Square Developer
Dashboard and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Square
severity: ERROR
languages: [generic]
- id: robusta-secrets-square-app-secret
patterns:
- pattern-regex: sq0c[a-z]{2}-[0-9A-Za-z_\-]{40,50}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Square application secret detected (sq0c prefix). Revoke in Square
Developer Dashboard.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Square
severity: ERROR
languages: [generic]
# -- Plaid -----------------------------------------------------------------
- id: robusta-secrets-plaid-access-token
patterns:
- pattern-regex: access-(?:sandbox|production)-[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Plaid access token detected. This grants access to linked bank accounts.
Rotate via Plaid API and store in a secrets manager.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Plaid
severity: ERROR
languages: [generic]
# -- Alibaba Cloud ---------------------------------------------------------
- id: robusta-secrets-alibaba-access-key
patterns:
- pattern-regex: LTAI[a-zA-Z0-9]{17,21}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Alibaba Cloud AccessKey ID detected (LTAI prefix). Revoke in RAM console
and use STS temporary credentials or instance RAM roles.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Alibaba
severity: ERROR
languages: [generic]
# -- Salesforce ------------------------------------------------------------
- id: robusta-secrets-salesforce-token
patterns:
- pattern-regex: 00[a-zA-Z0-9]{13}![a-zA-Z0-9_.]{96}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Salesforce session/access token detected. Revoke in Salesforce Setup
and use OAuth2 refresh flow with environment-stored credentials.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Salesforce
severity: ERROR
languages: [generic]
# -- Bitbucket App Password ------------------------------------------------
- id: robusta-secrets-bitbucket-app-password
patterns:
- pattern-regex: ATBB[A-Za-z0-9_=.\-]{30,}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Bitbucket App Password detected (ATBB prefix). Revoke in Bitbucket
Personal Settings and use repository access tokens for CI.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Bitbucket
severity: ERROR
languages: [generic]
# -- Docker Hub PAT --------------------------------------------------------
- id: robusta-secrets-dockerhub-pat
patterns:
- pattern-regex: dckr_pat_[a-zA-Z0-9_\-]{27}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Docker Hub Personal Access Token detected (dckr_pat_ prefix). Revoke
at hub.docker.com/settings/security and use short-lived tokens for CI.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Docker
severity: ERROR
languages: [generic]
# -- NuGet -----------------------------------------------------------------
- id: robusta-secrets-nuget-api-key
patterns:
- pattern-regex: oy2[a-z0-9]{43}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
NuGet API key detected. Revoke at nuget.org/account/apikeys. A leaked
key allows publishing packages (supply chain attack).
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: NuGet
severity: ERROR
languages: [generic]
# -- RubyGems --------------------------------------------------------------
- id: robusta-secrets-rubygems-api-key
patterns:
- pattern-regex: rubygems_[a-zA-Z0-9]{48}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
RubyGems API key detected (rubygems_ prefix). Revoke at rubygems.org
and use scoped tokens. A leaked key allows publishing gems.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: CRITICAL
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: RubyGems
severity: ERROR
languages: [generic]
# -- Discord Webhook -------------------------------------------------------
- id: robusta-secrets-discord-webhook
patterns:
- pattern-regex: https://discord\.com/api/webhooks/[0-9]{18,19}/[0-9a-zA-Z_\-]{68}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Discord Webhook URL detected. Anyone with this URL can post messages
to the channel. Delete in Discord server settings and recreate.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: MEDIUM
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Discord
severity: WARNING
languages: [generic]
# -- Zapier Webhook --------------------------------------------------------
- id: robusta-secrets-zapier-webhook
patterns:
- pattern-regex: https://hooks\.zapier\.com/hooks/catch/[A-Za-z0-9/]{16}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Zapier Webhook URL detected. Anyone with this URL can trigger the Zap.
Regenerate in Zapier and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: MEDIUM
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Zapier
severity: WARNING
languages: [generic]
# -- Microsoft Teams Webhook -----------------------------------------------
- id: robusta-secrets-teams-webhook
patterns:
- pattern-regex: https://[a-z0-9]+\.webhook\.office\.com/webhookb2/[A-Za-z0-9\-@]+/IncomingWebhook/[A-Za-z0-9]+/[A-Za-z0-9\-]+
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Microsoft Teams Incoming Webhook URL detected. Anyone with this URL can
post messages to the channel. Delete in Teams channel connector settings.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: MEDIUM
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Microsoft
severity: WARNING
languages: [generic]
# -- Nightfall AI ----------------------------------------------------------
- id: robusta-secrets-nightfall-api-key
patterns:
- pattern-regex: NF-[a-zA-Z0-9]{32}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Nightfall AI API key detected (NF- prefix). Revoke in Nightfall dashboard
and use environment variables.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: MEDIUM
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Nightfall
severity: ERROR
languages: [generic]
# -- Dropbox ---------------------------------------------------------------
- id: robusta-secrets-dropbox-token
patterns:
- pattern-regex: sl\.u\.[A-Za-z0-9_\-]{130,}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Dropbox access token detected (sl.u. prefix). Revoke in Dropbox App
Console and use OAuth2 refresh flow.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Dropbox
severity: ERROR
languages: [generic]
# -- Azure DevOps ----------------------------------------------------------
- id: robusta-secrets-azure-devops-pat
patterns:
- pattern-regex: (?i)(?:azure_devops_pat|ado_pat|vsts_pat)\s*[:=]\s*['"][A-Za-z0-9]{52}['"]
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Azure DevOps Personal Access Token detected. Revoke in Azure DevOps
user settings and use service principals for automation.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Azure
severity: ERROR
languages: [generic]
# -- CircleCI v2 -----------------------------------------------------------
- id: robusta-secrets-circleci-token
patterns:
- pattern-regex: CCIPAT_[a-zA-Z0-9]{22}_[a-fA-F0-9]{40}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
CircleCI Personal API Token v2 detected (CCIPAT_ prefix). Revoke in
CircleCI user settings and use project-scoped tokens for CI.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: CircleCI
severity: ERROR
languages: [generic]
# -- BuildKite -------------------------------------------------------------
- id: robusta-secrets-buildkite-token
patterns:
- pattern-regex: bkua_[a-z0-9]{40}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Buildkite API access token detected (bkua_ prefix). Revoke in
Buildkite personal settings.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Buildkite
severity: ERROR
languages: [generic]
# -- Harness ---------------------------------------------------------------
- id: robusta-secrets-harness-pat
patterns:
- pattern-regex: pat\.[A-Za-z0-9_]{22}\.[0-9a-f]{24}\.[A-Za-z0-9]{20}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Harness Personal Access Token detected (pat. prefix). Revoke in Harness
account settings and use service account tokens for automation.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Harness
severity: ERROR
languages: [generic]
# -- Sourcegraph Cody ------------------------------------------------------
- id: robusta-secrets-sourcegraph-cody
patterns:
- pattern-regex: slk_[a-f0-9]{64}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Sourcegraph Cody license key detected (slk_ prefix). Revoke in
Sourcegraph admin settings.
metadata:
cwe: ["CWE-798"]
confidence: HIGH
impact: MEDIUM
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Sourcegraph
severity: ERROR
languages: [generic]
# -- PagerDuty -------------------------------------------------------------
- id: robusta-secrets-pagerduty-api-key
patterns:
- pattern-regex: "u\\+[a-zA-Z0-9_+\\-]{18}"
paths:
exclude:
- "*.md"
- "*.lock"
message: >
PagerDuty API key detected (u+ prefix). Revoke in PagerDuty account
settings and use scoped OAuth tokens.
metadata:
cwe: ["CWE-798"]
confidence: MEDIUM
impact: HIGH
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: PagerDuty
severity: ERROR
languages: [generic]
# -- Twilio Account SID ---------------------------------------------------
- id: robusta-secrets-twilio-account-sid
patterns:
- pattern-regex: AC[0-9a-f]{32}
paths:
exclude:
- "*.md"
- "*.lock"
message: >
Twilio Account SID detected (AC prefix + 32 hex). While the SID alone
is not a secret, it paired with an auth token or API key grants full
account access. Verify no auth tokens are nearby.
metadata:
cwe: ["CWE-798"]
confidence: MEDIUM
impact: MEDIUM
author: Robusta Studio
license: "MIT - Copyright (c) 2026 Robusta Studio. For the open-source community."
provider: Twilio
severity: WARNING
languages: [generic]