id: springboot-threaddump

info:
  name: Detect Springboot Thread Dump page
  author: philippedelteil
  severity: low
  description: The threaddump endpoint provides a thread dump from the application's JVM.
  reference:
    - https://docs.spring.io/spring-boot/docs/2.4.11-SNAPSHOT/actuator-api/htmlsingle/#threaddump
  metadata:
    max-request: 2
  tags: springboot,misconfig

http:
  - method: GET
    path:
      - "{{BaseURL}}/threaddump"
      - "{{BaseURL}}/actuator/threaddump"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"threads":'
          - '"threadName":'
        condition: and

      - type: word
        part: header
        words:
          - "application/json"
          - "application/vnd.spring-boot.actuator"
          - "application/vnd.spring-boot.actuator.v2+json"
          - "application/vnd.spring-boot.actuator.v1+json"
        condition: or

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