id: linkerd-badrule-detect

info:
  name: Linkerd detection via bad rule
  author: dudez
  severity: info
  reference:
    - https://linkerd.io
  metadata:
    max-request: 1
  tags: tech,linkerd,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    headers:
      l5d-dtab: /svc/*

    matchers-condition: or
    matchers:
      - type: regex
        name: via-linkerd-present
        regex:
          - '(?mi)^Via\s*?:.*?linkerd.*$'
        part: header

      - type: regex
        name: l5d-err-present
        regex:
          - '(?mi)^l5d-err:.*$'
        part: header

      - type: regex
        name: l5d-success-class-present
        regex:
          - '(?mi)^l5d-success-class: 0.*$'
        part: header

      - type: word
        name: body-error-present
        words:
          - 'expected but end of input found at'
        part: body
# digest: 4a0a004730450220410f567252cd94ccc353950307951ca3fbee18350420a874976b440da97ecdf902210080d89b0199de4d4ebea42efddb5c0b44e21b0f210a6392438acf66dabbc7f8c9:922c64590222798bb761d5b6d8e72950