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