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,vuln

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: 4a0a004730450220031adfa716747956090d6e344335bd6edd3e33f00fb58387a2cc7a6e45f1f4ee02210093749a5806decd8816973a452fce42a8289a330338875b2f02e89e36380ebe1e:922c64590222798bb761d5b6d8e72950