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,vuln

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

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