$npx -y skills add microsoft/azure-skills --skill azure-complianceRun Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azur
| 1 | # Azure Compliance & Security Auditing |
| 2 | |
| 3 | ## Quick Reference |
| 4 | |
| 5 | | Property | Details | |
| 6 | |---|---| |
| 7 | | Best for | Compliance scans, security audits, Key Vault expiration checks | |
| 8 | | Primary capabilities | Comprehensive Resources Assessment, Key Vault Expiration Monitoring | |
| 9 | | MCP tools | azqr, subscription and resource group listing, Key Vault item inspection | |
| 10 | |
| 11 | ## When to Use This Skill |
| 12 | |
| 13 | - Run azqr or Azure Quick Review for compliance assessment |
| 14 | - Validate Azure resource configuration against best practices |
| 15 | - Identify orphaned or misconfigured resources |
| 16 | - Audit Key Vault keys, secrets, and certificates for expiration |
| 17 | |
| 18 | ## Skill Activation Triggers |
| 19 | |
| 20 | Activate this skill when user wants to: |
| 21 | - Check Azure compliance or best practices |
| 22 | - Assess Azure resources for configuration issues |
| 23 | - Run azqr or Azure Quick Review |
| 24 | - Identify orphaned or misconfigured resources |
| 25 | - Review Azure security posture |
| 26 | - "Show me expired certificates/keys/secrets in my Key Vault" |
| 27 | - "Check what's expiring in the next 30 days" |
| 28 | - "Audit my Key Vault for compliance" |
| 29 | - "Find secrets without expiration dates" |
| 30 | - "Check certificate expiration dates" |
| 31 | |
| 32 | ## Prerequisites |
| 33 | |
| 34 | - Authentication: user is logged in to Azure via `az login` |
| 35 | - Permissions to read resource configuration and Key Vault metadata |
| 36 | |
| 37 | ## Assessments |
| 38 | |
| 39 | | Assessment | Reference | |
| 40 | |------------|-----------| |
| 41 | | Comprehensive Compliance (azqr) | [references/azure-quick-review.md](references/azure-quick-review.md) | |
| 42 | | Key Vault Expiration | [references/azure-keyvault-expiration-audit.md](references/azure-keyvault-expiration-audit.md) | |
| 43 | | Resource Graph Queries | [references/azure-resource-graph.md](references/azure-resource-graph.md) | |
| 44 | |
| 45 | ## MCP Tools |
| 46 | |
| 47 | | Tool | Purpose | |
| 48 | |------|---------| |
| 49 | | `mcp_azure_mcp_extension_azqr` | Run azqr compliance scans | |
| 50 | | `mcp_azure_mcp_subscription_list` | List available subscriptions | |
| 51 | | `mcp_azure_mcp_group_list` | List resource groups | |
| 52 | | `keyvault_key_list` | List all keys in vault | |
| 53 | | `keyvault_key_get` | Get key details including expiration | |
| 54 | | `keyvault_secret_list` | List all secrets in vault | |
| 55 | | `keyvault_secret_get` | Get secret details including expiration | |
| 56 | | `keyvault_certificate_list` | List all certificates in vault | |
| 57 | | `keyvault_certificate_get` | Get certificate details including expiration | |
| 58 | |
| 59 | ## Assessment Workflow |
| 60 | |
| 61 | 1. Select scope (subscription or resource group) for Comprehensive Resources Assessment. |
| 62 | 2. Run azqr and capture output artifacts. |
| 63 | 3. Analyze Scan Results and summarize findings and recommendations. |
| 64 | 4. Review Key Vault Expiration Monitoring output for keys, secrets, and certificates. |
| 65 | 5. Classify issues and propose remediation or fix steps for each finding. |
| 66 | |
| 67 | ### Priority Classification |
| 68 | |
| 69 | | Priority | Guidance | |
| 70 | |---|---| |
| 71 | | Critical | Immediate remediation required for high-impact exposure | |
| 72 | | High | Resolve within days to reduce risk | |
| 73 | | Medium | Plan a resolution in the next sprint | |
| 74 | | Low | Track and fix during regular maintenance | |
| 75 | |
| 76 | ## Error Handling |
| 77 | |
| 78 | | Error | Message | Remediation | |
| 79 | |---|---|---| |
| 80 | | Authentication required | "Please login" | Run `az login` and retry | |
| 81 | | Access denied | "Forbidden" | Confirm permissions and fix role assignments | |
| 82 | | Missing resource | "Not found" | Verify subscription and resource group selection | |
| 83 | |
| 84 | ## Best Practices |
| 85 | |
| 86 | - Run compliance scans on a regular schedule (weekly or monthly) |
| 87 | - Track findings over time and verify remediation effectiveness |
| 88 | - Separate compliance reporting from remediation execution |
| 89 | - Keep Key Vault expiration policies documented and enforced |
| 90 | |
| 91 | ## SDK Quick References |
| 92 | |
| 93 | For programmatic Key Vault access, see the condensed SDK guides: |
| 94 | |
| 95 | - **Key Vault (Python)**: [Secrets/Keys/Certs](references/sdk/azure-keyvault-py.md) |
| 96 | - **Secrets**: [TypeScript](references/sdk/azure-keyvault-secrets-ts.md) | [Rust](references/sdk/azure-keyvault-secrets-rust.md) | [Java](references/sdk/azure-security-keyvault-secrets-java.md) |
| 97 | - **Keys**: [.NET](references/sdk/azure-security-keyvault-keys-dotnet.md) | [Java](references/sdk/azure-security-keyvault-keys-java.md) | [TypeScript](references/sdk/azure-keyvault-keys-ts.md) | [Rust](references/sdk/azure-keyvault-keys-rust.md) |
| 98 | - **Certificates**: [Rust](references/sdk/azure-keyvault-certificates-rust.md) |