Skip to content

LS-AZ-004: Azure DevOps PAT

Severity HIGH
Blast radius Source code and CI/CD compromise
Rotate at https://dev.azure.com/_usersSettings/tokens

If this leaks

Acts as the user in Azure DevOps with the token's scopes, including repos, pipelines and artifact feeds.

What to do

  1. Rotate or revoke the credential at https://dev.azure.com/_usersSettings/tokens.
  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)(?:azure_?devops|ado_?pat|vsts)[\w.\-]{0,25}['\"]?\s*(?::=|=>|[=:])\s*['\"]?([a-z0-9]{52})(?![A-Za-z0-9])

Suppress

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

disable_rules: [LS-AZ-004]