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

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

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