id: squarespace-access-token

info:
  name: Squarespace Access Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/squarespace-access-token.go
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/squarespace-access-token.yaml
  metadata:
    verified: true
    max-request: 1
  tags: squarespace,exposure,tokens

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

    extractors:
      - type: regex
        part: body
        regex:
          - (?i)(?:squarespace)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)
# digest: 490a0046304402203347f3def82e5898995edd4a5cf10325f353a1c057eef13632d994f77f40a3e902202568efa3f900e66f808f1f45e6a988ff68d3a402389af52e6ceb865f0aac0340:922c64590222798bb761d5b6d8e72950