id: github-app

info:
  name: GitHub App Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/data/default/rules/github.yml
    - https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-authentication-to-github
    - https://docs.github.com/en/developers/apps/building-oauth-apps/authorizing-oauth-apps
    - https://github.blog/2021-04-05-behind-githubs-new-authentication-token-formats/
  metadata:
    verified: true
    max-request: 1
  tags: github,app,token,exposure

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

    extractors:
      - type: regex
        part: body
        regex:
          - '\b((?:ghu|ghs)_[a-zA-Z0-9]{36})\b'
# digest: 4b0a0048304602210091cf819ea8be6f8d15ad057725dd311dbe31463fd462fde31c8f902f13048b4b022100f280b6be874d76a0c94a5ede219b8915633a57e0db469a3744b4e1023f733706:922c64590222798bb761d5b6d8e72950