id: ghe-encrypt-saml

info:
  name: GitHub Enterprise - Encrypted SAML
  author: rootxharsh,iamnoooob,pdresearch
  severity: info
  description: |
    This template checks if Encrypted SAML (Security Assertion Markup Language) is enabled on a GitHub Enterprise instance.
  reference:
    - https://docs.github.com/en/enterprise-server@3.10/admin/managing-iam/using-saml-for-enterprise-iam/enabling-encrypted-assertions
  metadata:
    verified: true
    max-request: 1
    shodan-query: title:"GitHub Enterprise"
  tags: github,ghe,saml

http:
  - method: GET
    path:
      - "{{BaseURL}}/saml/metadata"

    redirects: true
    max-redirects: 2

    matchers:
      - type: word
        part: body
        words:
          - EntityDescriptor
          - KeyDescriptor
          - use="encryption"
        condition: and
# digest: 4a0a00473045022100c58b37223c543e837d907f032cf5476953d4c9fa5a833a95cedb0ff4cf5bb5960220234273412d29b703014ec6f959c1f8cf5d6e31dfa99b3a7f2e0ab551e917fc98:922c64590222798bb761d5b6d8e72950