id: openai-api-key

info:
  name: OpenAI API Key
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/openai.yml
    - https://platform.openai.com/docs/api-reference
    - https://platform.openai.com/docs/api-reference/authentication
  metadata:
    verified: true
    max-request: 1
  tags: openai,token,exposure

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    extractors:
      - type: regex
        part: body
        regex:
          - "(sk-[a-zA-Z0-9]{48})"
# digest: 490a0046304402204547243cc11dbf7b64dade689b926d57e9861e181c94ffb6e8bf679428347ac30220455dbecfc316e2c2b8501eaafbfbf449383be13dd074797ede811eb55ac5a85c:922c64590222798bb761d5b6d8e72950