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
  classification:
    cwe-id: CWE-522,CWE-540
  metadata:
    verified: true
    max-request: 1
  tags: nuget,token,exposure,vuln

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

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