id: github-gemfile-files

info:
  name: Github Gemfiles
  author: hahwul
  severity: info
  description: Find github page files(Gemfile / Gemfile.lock)
  metadata:
    max-request: 2
  tags: github,exposure,files,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/Gemfile"
      - "{{BaseURL}}/Gemfile.lock"

    matchers-condition: or
    matchers:
      - type: dsl
        dsl:
          - 'contains(body, "https://rubygems.org")'
          - 'contains(body, "source")'
          - 'contains(body, "gem")'
          - 'status_code == 200'
        condition: and

      - type: dsl
        dsl:
          - 'contains(body, "https://rubygems.org")'
          - 'contains(body, "remote")'
          - 'contains(body, "specs")'
          - 'status_code == 200'
        condition: and
# digest: 4b0a00483046022100d9836f9a5ba8bbce774efb5a25bfad3dc175bd5669f2004cec5bb7e9a50bd704022100fbdffe1312c2bde44623a6ee6e3ef6ef31e659bdb454f3d7214e8ffdf809e7e3:922c64590222798bb761d5b6d8e72950