id: crates-api-key

info:
  name: Crates.io API Key
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/crates.io.yml
    - https://crates.io/data-access
    - https://github.com/rust-lang/crates.io/blob/master/src/util/token.rs
  metadata:
    verified: true
    max-request: 1
  tags: crates,token,exposure

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

    extractors:
      - type: regex
        part: body
        regex:
          - '\bcio[a-zA-Z0-9]{32}\b'
# digest: 4a0a0047304502207099554d4fed73671bedfd1c89895dd835c9ef255eb607eb8a5dded531189909022100d3f0e5ca68ce1c52996f1f349dc5187f5d660f27f010015cf1738e364f002a64:922c64590222798bb761d5b6d8e72950