LS-AZ-002: Azure AD Client Secret¶
| Severity | CRITICAL |
| Blast radius | Azure AD application and directory compromise |
| Rotate at | https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade |
--verify |
POST https://login.microsoftonline.com/common/oauth2/v2.0/token (placeholder client_id) |
If this leaks¶
Allows the application registration to authenticate as itself and obtain access tokens for whatever Microsoft Graph or API permissions it has been granted, including Azure AD directory data.
What to do¶
- Rotate or revoke the credential at https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade.
- 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|aad)(?:.{0,20})?client[_-]?secret\s*[=:]\s*['\"]?([A-Za-z0-9_~.\-]{34,40})['\"]?
Suppress¶
On one line: # leakscan:ignore LS-AZ-002. For the whole project:
disable_rules: [LS-AZ-002]