id: phpcs-config

info:
  name: PHP_CodeSniffer Configuration Exposure - Detect
  author: DhiyaneshDK
  severity: info
  description: |
    PHP_CodeSniffer configuration file was detected.
  reference:
    - https://github.com/squizlabs/PHP_CodeSniffer
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cvss-score: 0
    cwe-id: CWE-200
  metadata:
    verified: true
    max-request: 1
    shodan-query: html:"phpcs.xml"
  tags: devops,exposure,php,phpcs,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/phpcs.xml"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'ruleset name'
          - 'rule ref='
          - '<file>'
        condition: and

      - type: word
        part: header
        words:
          - "application/xml"

      - type: status
        status:
          - 200
# digest: 490a0046304402204857fbacaa93ff7d71839f1d207e97f268653ab86e409079b2e00dfd950ca27b02200520945cad81ffe2d6a2edcd753f8ca951e92c95252006a65a989cc1e1f84775:922c64590222798bb761d5b6d8e72950