id: nuget-api-key

info:
  name: NuGet API Key
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/nuget.yml
    - https://docs.microsoft.com/en-us/nuget/nuget-org/publish-a-package#create-api-keys
  metadata:
    verified: true
    max-request: 1
  tags: nuget,token,exposure

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

    extractors:
      - type: regex
        part: body
        regex:
          - "(oy2[a-z0-9]{43})"
# digest: 4a0a00473045022100a406b70eed9f4f5c190ac7e0dd8bba3130b66e94f5bd5ed6099a7d44e1e800d802200cfa83b751a008e93454c9778995a6ebb86c4190a393a0acd31167c18f37551a:922c64590222798bb761d5b6d8e72950