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¶
- Rotate or revoke the credential at https://dev.azure.com/_usersSettings/tokens.
- Check the provider's audit logs for use you don't recognise.
- 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]