id: github-refresh

info:
  name: GitHub Refresh 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,refresh,token,exposure,vuln

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

    extractors:
      - type: regex
        part: body
        regex:
          - '\b(ghr_[a-zA-Z0-9]{76})\b'
# digest: 490a00463044022015f02ef6c0fdac3016c8a4eeead6fbbf0d184257ef13b17d3a01faae6447c5c302201f4f1fb495f4893662cbe486aeadc9a104fa016bcc3615f53ded6aa066a42e58:922c64590222798bb761d5b6d8e72950