id: github-oauth-access

info:
  name: GitHub OAuth Access 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,oauth,token,exposure

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

    extractors:
      - type: regex
        part: body
        regex:
          - '\b(gho_[a-zA-Z0-9]{36})\b'
# digest: 4a0a00473045022100818c6e51cba6770b8d199a280e93b1c65d58f62a2c4692caeb15f65343aa6853022004d21bb698b1e41a637e87fc43b8b23ff4a0b1936ed3b11dc089926ead92d1dc:922c64590222798bb761d5b6d8e72950