id: finnhub-accesstoken

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

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

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