rules:
  - id: google-maps-apikeyleak
    patterns:
      - pattern-regex: ^(AIza[0-9A-Za-z_-]{35}(?!\S))$
    message: Detects potential Google Maps API keys in code
    languages:
      - generic
    severity: WARNING
    metadata:
      description: Detects potential Google Maps API keys in code
      severity: MEDIUM
      category: security
      confidence: MEDIUM
      impact: HIGH
      likelihood: MEDIUM
      subcategory:
        - audit
      owasp:
        - A3:2017 Sensitive Data Exposure
      references:
        - https://ozguralp.medium.com/unauthorized-google-maps-api-key-usage-cases-and-why-you-need-to-care-1ccb28bf21e
      cwe:
        - "CWE-538: Insertion of Sensitive Information into Externally-Accessible File or Directory"
      technology:
        - Google Maps
