id: hashicorp-token

info:
  name: Hashicorp API Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/hashicorp-tf-api-token.go
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/hashicorp-tf-api-token.yaml
  metadata:
    verified: true
    max-request: 1
  tags: hashicorp,exposure,tokens

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

    extractors:
      - type: regex
        part: body
        regex:
          - (?i)[a-z0-9]{14}\.atlasv1\.[a-z0-9\-_=]{60,70}
# digest: 4a0a00473045022100ddb9261270ba67f305ce0d270a6330a0b1a3fd9ce5bb3e178b157cfe2c5784de022043ec890cac16be5147d9644756d7c1fa6e92caa1b3a84fd1c74ba569ffedc6eb:922c64590222798bb761d5b6d8e72950