id: github-app

info:
  name: GitHub App Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/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,vuln

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

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