id: gocardless-token

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

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

    extractors:
      - type: regex
        part: body
        regex:
          - (?i)(?:gocardless)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(live_(?i)[a-z0-9\-_=]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)
# digest: 4a0a004730450221008d71051b10a5c592dd3014bad5224336f41249703759c4cf4a0c2334c967634702201eac8457b07ba1c01713684e1cd3800c21fe3a1d6252bf92f9105ae827ce313e:922c64590222798bb761d5b6d8e72950