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

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

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