generic.secrets.security.detected-stripe-restricted-api-key.detected-stripe-restricted-api-key

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

Stripe Restricted API Key detected

Run Locally

Run in CI

Defintion

rules:
  - id: detected-stripe-restricted-api-key
    pattern-regex: rk_live_[0-9a-zA-Z]{24}
    languages:
      - regex
    message: Stripe Restricted 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
        - stripe
      confidence: MEDIUM
      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: LOW
      license: Commons Clause License Condition v1.0[LGPL-2.1-only]
      vulnerability_class:
        - Hard-coded Secrets

Examples

detected-stripe-restricted-api-key.txt

# ruleid: detected-stripe-restricted-api-key
rk_live_xf2fh0Hu3LqXlqqUg2DEWhEz

# ok: detected-stripe-restricted-api-key
rk_live_