Skip to content

LS-GEN-004: Bearer Token

Severity MEDIUM
Blast radius Unknown API session access
Rotate at https://vasishta03.github.io/leakscan/rules/

If this leaks

An unidentified bearer token. If still valid, it grants whatever access the issuing service associates with that token, usually without any additional credential.

What to do

  1. Rotate or revoke the credential at https://vasishta03.github.io/leakscan/rules/.
  2. Check the provider's audit logs for use you don't recognise.
  3. Remove it from git history (leakscan purge --help) and load it from an environment variable or secret manager instead.

Pattern

(?i)bearer\s+([a-zA-Z0-9\-_\.]{20,})

Suppress

On one line: # leakscan:ignore LS-GEN-004. For the whole project:

disable_rules: [LS-GEN-004]