rules:
- id: detected-generic-api-key
  patterns:
  - pattern-regex: "[aA][pP][iI]_?[kK][eE][yY][=_:\\s-]+['|\"]?(?<SECRET>[0-9a-zA-Z]{32,45})['|\"]?"
  - metavariable-analysis:
      analyzer: entropy
      metavariable: $SECRET
  languages: [regex]
  message: Generic API Key detected
  severity: ERROR
  metadata:
    source-rule-url: https://github.com/dxa4481/truffleHogRegexes/blob/master/truffleHogRegexes/regexes.json
    category: security
    technology:
    - secrets
    confidence: LOW
    references:
    - https://github.com/dxa4481/truffleHogRegexes/blob/master/truffleHogRegexes/regexes.json
    owasp:
    - A07:2021 - Identification and Authentication Failures
    - A07:2025 - Authentication Failures
    cwe:
    - 'CWE-798: Use of Hard-coded Credentials'
    cwe2022-top25: true
    cwe2021-top25: true
    subcategory:
    - audit
    likelihood: LOW
    impact: MEDIUM
