Outil CLI pour auditer la posture de sécurité Azure, les RBAC, les NSG, le stockage, l'identité et le chiffrement.
| ID | Catégorie | Contrôle | Gravité |
|---|
| AZ-001 | RBAC | Owner / Contributor attribué au niveau de l'abonnement | CRITICAL |
| AZ-002 | RBAC | Owner / Contributor attribué au niveau du groupe de ressources | HIGH |
| AZ-003 | Network | NSG avec règle d'autorisation entrante 0.0.0.0/0 | HIGH |
| AZ-004 | Stockage | Compte de stockage avec accès public aux blobs activé | HIGH |
| AZ-005 | Identité | Utilisateur Entra ID sans MFA enregistré | HIGH |
| AZ-006 | Identité | Service principal avec autorisations Owner / Contributor | HIGH |
| AZ-007 | Chiffrement | Disque managé sans configuration de chiffrement explicite | MEDIUM |
| AZ-008 | Chiffrement | Key Vault exposé au réseau public sans restriction de pare-feu | HIGH |
| AZ-009 | Surveillance | Rétention du journal d'activité inférieure à 90 jours | MEDIUM |
| AZ-010 | Surveillance | Microsoft Defender for Cloud non activé sur les types de ressources clés | HIGH |
| AZ-011 | Surveillance | Key Vault sans journalisation de diagnostic activée | MEDIUM |
| AZ-012 | Calcul | Machine virtuelle avec adresse IP publique directement attachée | MEDIUM |
| AZ-013 | Calcul | Machine virtuelle sans extension de protection des points de terminaison | MEDIUM |
| AZ-014 | Calcul | Disque OS de machine virtuelle sans Azure Disk Encryption (ADE) | MEDIUM |
| AZ-015 | Network | Port RDP 3389 exposé à Internet via NSG | CRITICAL |
| AZ-016 | Network | Port SSH 22 exposé à Internet via NSG | CRITICAL |
| AZ-017 | Stockage | Compte de stockage autorisant le trafic non-HTTPS | HIGH |
| AZ-018 | Stockage | Compte de stockage autorisant les versions TLS héritées (inférieures à 1.2) | MEDIUM |
| AZ-019 | Identité | Comptes d'utilisateurs invités présents dans le locataire Entra ID | LOW |
| AZ-020 | Chiffrement | Key Vault sans suppression réversible ni protection contre la purge | MEDIUM |
az login (Azure CLI)AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_IDReader sur l'abonnementUserAuthenticationMethod.Read.AllApplication.Read.AllLes contrôles d'identité (AZ-005, AZ-019) sont ignorés proprement si les autorisations de l'API Graph ne sont pas disponibles — le reste de l'audit s'exécute sans être affecté.
pip install -e .
# Full audit — all checks, all severities
azure-auditor
# Target a specific subscription
azure-auditor --subscription <subscription-id>
# Show only HIGH and CRITICAL findings
azure-auditor --severity HIGH
# Save JSON report to a specific directory
azure-auditor --output-dir ./reports
# Terminal output only
azure-auditor --no-json
# Verbose logging
azure-auditor --verbose
Ou sans installation :
PYTHONPATH=src python -m azure_security_auditor.cli --subscription <id>
Terminal — tableau mis en forme par Rich, trié par gravité (CRITICAL en premier) :
╭──────────────────────────────────────────────────────────────────╮
│ Azure Security Posture Audit │
│ Subscription: My Production Subscription │
│ ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx │
│ Run at: 2026-07-12T10:00:00Z │
│ Findings: 12 total (2 CRITICAL 6 HIGH 4 MEDIUM 0 LOW) │
╰──────────────────────────────────────────────────────────────────╯
Severity Check ID Check Resource Detail
✖ CRITICAL AZ-015 RDP Port 3389 Exposed to Internet... /subscriptions/. ...
✖ CRITICAL AZ-001 Owner Role Assigned at Subscription... <principal-id> ...
■ HIGH AZ-010 Defender for Cloud Not Enabled — VMs /subscriptions/. ...
...
JSON — Écrit dans reports/azure_audit_<subscription>_<timestamp>.json.
src/
azure_security_auditor/
cli.py # argparse entrypoint
engine.py # ThreadPoolExecutor orchestrator
models.py # Finding, AuditResult, Severity
checks/
rbac.py # AZ-001, AZ-002
network.py # AZ-003, AZ-015, AZ-016
storage.py # AZ-004, AZ-017, AZ-018
identity.py # AZ-005, AZ-019
service_principals.py # AZ-006
encryption.py # AZ-007, AZ-008, AZ-020
monitoring.py # AZ-009, AZ-010, AZ-011
compute.py # AZ-012, AZ-013, AZ-014
reporters/
terminal.py # Rich table output
json_reporter.py # JSON file output
Utilise DefaultAzureCredential — essaie dans l'ordre :
AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID)az login)export AZURE_CLIENT_ID="<app-id>"
export AZURE_CLIENT_SECRET="<secret>"
export AZURE_TENANT_ID="<tenant-id>"
azure-auditor --subscription <subscription-id>