generic.secrets.security.detected-heroku-api-key.detected-heroku-api-key

Community Favorite
profile photo of semgrepsemgrep
Author
37,965
Download Count*

Heroku API Key detected

Run Locally

Run in CI

Defintion

rules:
  - id: detected-heroku-api-key
    pattern-regex: "[hH][eE][rR][oO][kK][uU].*[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-F\
      a-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}"
    languages:
      - regex
    message: Heroku API Key detected
    severity: ERROR
    metadata:
      cwe:
        - "CWE-798: Use of Hard-coded Credentials"
      source-rule-url: https://github.com/dxa4481/truffleHogRegexes/blob/master/truffleHogRegexes/regexes.json
      category: security
      technology:
        - secrets
        - heroku
      confidence: LOW
      owasp:
        - A07:2021 - Identification and Authentication Failures
      references:
        - https://owasp.org/Top10/A07_2021-Identification_and_Authentication_Failures
      cwe2022-top25: true
      cwe2021-top25: true
      subcategory:
        - audit
      likelihood: LOW
      impact: MEDIUM
      license: Commons Clause License Condition v1.0[LGPL-2.1-only]
      vulnerability_class:
        - Hard-coded Secrets

Examples

detected-heroku-api-key.txt

# ruleid: detected-heroku-api-key
HEROKU_API_KEY = A6264401-E60A-48A9-941F-6446E78EC164

# ruleid: detected-heroku-api-key
heroku_api_key = a6264401-e60a-48a9-941f-6446e78ec164