id: service-account-credentials

info:
  name: Service Account Credentials File Disclosure
  author: ritikchaddha
  severity: medium
  description: Service Account Credentials internal file is exposed.
  reference:
    - https://x.com/KHIZER_JAVED47/status/1864473060109381690
  metadata:
    verified: true
    max-request: 2
    google-query: intitle:"index of" "service-Account-Credentials.json"
  tags: privatekey,exposure,files,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/assets/other/service-account-credentials.json"
      - "{{BaseURL}}/service-account-credentials.json"
      - "{{BaseURL}}/serviceAccountCredentials.json"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        words:
          - '"private_key_id":'
          - '"private_key":'
        condition: and

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