id: application-yaml

info:
  name: application.yaml detection
  author: Cristi vlad (@cristivlad25)
  severity: info
  description: Finds Application YAML files which often contain sensitive information.
  metadata:
    max-request: 4
  tags: misconfig,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/app.yaml"
      - "{{BaseURL}}/app.yml"
      - "{{BaseURL}}/application.yaml"
      - "{{BaseURL}}/application.yml"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        condition: or
        words:
          - "runtime:"
          - "spring:"
          - "datasource:"
          - "platform:"
          - "server:"
          - "job:"

      - type: status
        status:
          - 200

      - type: dsl
        dsl:
          - "!contains(tolower(body), '<html')"
          - "!contains(tolower(body), '<body')"
          - "!contains(tolower(body), '</h1>')"
          - "!contains(tolower(body), '</h2>')"
          - "!contains(tolower(body), '</h3>')"
          - "!contains(tolower(body), '<?xml')"
        condition: and
# digest: 4a0a0047304502210098c19d5aca29d58784863a3ceb7f6b5ab508c186a9622aa64130db359f929e070220466c1007e1928871d583961701f11b6e559c2eac5e41572a05fcb5022a4429f9:922c64590222798bb761d5b6d8e72950