id: cratesio-api-key

info:
  name: Crates.io API Key - Detect
  author: DhiyaneshDK
  severity: info
  description: Crates.io API key was detected.
  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:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cvss-score: 0
    cwe-id: CWE-200
  metadata:
    verified: true
  tags: keys,file,crates,token
file:
  - extensions:
      - all

    extractors:
      - type: regex
        part: body
        regex:
          - '\bcio[a-zA-Z0-9]{32}\b'

# Enhanced by md on 2023/05/04
# digest: 4a0a0047304502207d40d14d143318e327b17b9667b64b00f1fb1d652e84dc1b22e1182f27a63410022100f1f1e0b64f5888f01fc140a177342c43dc8579f43fe7d63f19d77b1b95782066:922c64590222798bb761d5b6d8e72950