Skip to content

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

  1. Rotate or revoke the credential at https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade.
  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|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]