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

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: 4a0a0047304502200d134736212d234983e91130a56c1d156fb58bb2268cd3455eeb5035768adfc3022100ca5b9e823e8c642a70771605845746b17f126d5aaee3460d6cc62a74c5b98c79:922c64590222798bb761d5b6d8e72950