id: debug-vars

info:
  name: Golang Expvar - Detect
  author: luqman
  severity: low
  description: Golang expvar function exposes multiple public variables via HTTP such as stack trace information and server operation counters.
  metadata:
    max-request: 1
  tags: go,debug,exposure

http:
  - method: GET
    path:
      - "{{BaseURL}}/debug/vars"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - '"memstats":'
          - '"cmdline":'
        condition: and

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