id: composer-auth-json

info:
  name: Composer-auth Json File Disclosure
  author: DhiyaneshDK
  severity: low
  description: Composer Auth Josn file is disclosed.
  reference: https://www.exploit-db.com/ghdb/5768
  classification:
    cpe: cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: getcomposer
    product: composer
    google-query: intext:"index of /" ".composer-auth.json"
  tags: exposure,devops,files

http:
  - method: GET
    path:
      - "{{BaseURL}}/.composer-auth.json"
      - "{{BaseURL}}/vendor/webmozart/assert/.composer-auth.json"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        words:
          - 'github-oauth'
          - 'github.com'
        condition: and

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