id: cargo-toml-file

info:
  name: Cargo TOML File Disclosure
  author: DhiyaneshDk
  severity: info
  reference:
    - https://doc.rust-lang.org/cargo/reference/manifest.html
  classification:
    cpe: cpe:2.3:a:rust-lang:cargo:*:*:*:*:rust:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: rust-lang
    product: cargo
    shodan-query: html:"Cargo.toml"
  tags: exposure,files,cargo

http:
  - method: GET
    path:
      - '{{BaseURL}}/Cargo.toml'

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "[package]"
          - "[dependencies]"
        condition: and

      - type: status
        status:
          - 200
# digest: 4b0a00483046022100d02de8182c657b7a6a2b9e5dc7fa261bc757f32fad7da88854e99e1264b89429022100ac85aca44e25f51e4111713fcc18ec7b3794ffba23382ad9b5bc5eb6c7d176eb:922c64590222798bb761d5b6d8e72950