id: vault-service-token

info:
  name: Vault Service Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/vault-service-token.go
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/vault-service-token.yaml
  metadata:
    verified: true
    max-request: 1
  tags: vault,exposure,tokens

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

    extractors:
      - type: regex
        part: body
        regex:
          - (?i)\b(hvs\.[a-z0-9_-]{90,100})(?:['|\"|\n|\r|\s|\x60|;]|$)
# digest: 4a0a004730450220226331374515876c6b89ee431ce3f9dfa1860241d0cb3ae11482d19cb0798c580221008953110ea8da7dc2d97377f5d5e9c357f9c1284c263aad01f08394d5c0691ca9:922c64590222798bb761d5b6d8e72950