id: salesforce-access-token

info:
  name: Salesforce Access Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/salesforce.yml
    - https://help.salesforce.com/s/articleView?id=sf.remoteaccess_access_tokens.htm&type=5
    - https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/quickstart_oauth.htm
  classification:
    cwe-id: CWE-522,CWE-540
  metadata:
    verified: true
    max-request: 1
  tags: salesforce,exposure,tokens,vuln

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

    extractors:
      - type: regex
        part: body
        regex:
          - \b(00[a-zA-Z0-9]{13}![a-zA-Z0-9._]{96})(?:\b|$|[^a-zA-Z0-9._])
# digest: 4b0a00483046022100bf5b3396ceda640b2b73a18d37296d7127c357ceb0567c6921c82ffb8dcb9dfe02210082e3929552d864e6d9920810451b13f5b5f93c237e67054594049dd9c4782795:922c64590222798bb761d5b6d8e72950