id: readme-api-token

info:
  name: Readme API Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/readme-api-token.go
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/readme-api-token.yaml
  classification:
    cwe-id: CWE-522,CWE-540
  metadata:
    max-request: 1
    verified: true
  tags: exposure,token,readme,vuln

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

    extractors:
      - type: regex
        part: body
        regex:
          - (?i)\b(rdme_[a-z0-9]{70})(?:['|\"|\n|\r|\s|\x60|;]|$)
# digest: 4a0a00473045022100ba215022f82abd5e7e843b6d6052be6b6cf1a65947b5fb623346243208abc25102204abc0f01b84b4342db35d3e018bc5cc80d69bcabe66818134f16cee3e281ea62:922c64590222798bb761d5b6d8e72950