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
    - https://developer.hashicorp.com/vault/docs/concepts/tokens
  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: 4a0a004730450221009eafc7b68320dc6942f6cd46249619aeebc40bcd893394c0a1e45e62c56b4be70220690a47e06fbadd266a100a85f93c005e873ef9468941a42746e0efb4b5728668:922c64590222798bb761d5b6d8e72950