AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The azure-compliance skill provides a structured approach to auditing Azure environments for security, reliability, and operational best practices. It leverages the azqr tool for comprehensive resource assessments and includes specific capabilities for monitoring Key Vault assets, such as secrets, keys, and certificates, for expiration. The skill guides users through selecting a scope, running scans, analyzing results, and prioritizing remediation based on severity levels.
What it does
- Executes compliance scans using the azqr tool.
- Monitors Azure Key Vault for expiring secrets, keys, and certificates.
- Lists subscriptions and resource groups for targeted auditing.
- Provides a framework for classifying findings by priority (Critical to Low).
- Offers guidance on interpreting scan results and remediation patterns.
- Supports programmatic access to Key Vault via various SDKs.
When to use it
- During scheduled security and compliance audits.
- When identifying orphaned or unused Azure resources.
- Before performing major infrastructure changes or migrations.
- To proactively check for expiring certificates or secrets in Key Vault.
- When validating adherence to Azure best practices.
Advantages
- Automates the collection of compliance and security data.
- Standardizes the assessment process across different Azure environments.
- Helps reduce risk by identifying expiring credentials early.
- Provides clear prioritization logic for remediation efforts.
- Integrates multiple assessment sources into a single workflow.
Usage examples
- “Run a compliance scan on my production subscription.”
- The agent will list available subscriptions, execute the azqr scan on the selected scope, and provide a summary of findings categorized by reliability, security, and cost.
- “Check for any expiring secrets in my Key Vault.”
- The agent will inspect the specified Key Vault, retrieve expiration dates for all secrets, and report any that are nearing their expiration date.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/microsoft/azure-compliance/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip azure-compliance.zip -d .agents/skills
Documentation by Microsoft
Azure Compliance & Security Auditing
Quick Reference
| Property | Details |
|---|---|
| Best for | Compliance scans, security audits, Key Vault expiration checks |
| Primary capabilities | Comprehensive Resources Assessment, Key Vault Expiration Monitoring |
| MCP tools | azqr, subscription and resource group listing, Key Vault item inspection |
Prerequisites
Authentication: user is logged in to Azure via
az loginPermissions to read resource configuration and Key Vault metadata
Assessments
| Assessment | Reference |
|---|---|
| Comprehensive Compliance (azqr) | references/azure-quick-review.md |
| Key Vault Expiration | references/azure-keyvault-expiration-audit.md |
| Resource Graph Queries | references/azure-resource-graph.md |
MCP Tools
| Tool | Purpose |
|---|---|
mcp_azure_mcp_extension_azqr | Run azqr compliance scans |
mcp_azure_mcp_subscription_list | List available subscriptions |
mcp_azure_mcp_group_list | List resource groups |
keyvault_key_list | List all keys in vault |
keyvault_key_get | Get key details including expiration |
keyvault_secret_list | List all secrets in vault |
keyvault_secret_get | Get secret details including expiration |
keyvault_certificate_list | List all certificates in vault |
keyvault_certificate_get | Get certificate details including expiration |
Assessment Workflow
Select scope (subscription or resource group) for Comprehensive Resources Assessment.
Run azqr and capture output artifacts.
Analyze Scan Results and summarize findings and recommendations.
Review Key Vault Expiration Monitoring output for keys, secrets, and certificates.
Classify issues and propose remediation or fix steps for each finding.
Priority Classification
| Priority | Guidance |
|---|---|
| Critical | Immediate remediation required for high-impact exposure |
| High | Resolve within days to reduce risk |
| Medium | Plan a resolution in the next sprint |
| Low | Track and fix during regular maintenance |
Error Handling
| Error | Message | Remediation |
|---|---|---|
| Authentication required | "Please login" | Run az login and retry |
| Access denied | "Forbidden" | Confirm permissions and fix role assignments |
| Missing resource | "Not found" | Verify subscription and resource group selection |
Best Practices
Run compliance scans on a regular schedule (weekly or monthly)
Track findings over time and verify remediation effectiveness
Separate compliance reporting from remediation execution
Keep Key Vault expiration policies documented and enforced
SDK Quick References
For programmatic Key Vault access, see the condensed SDK guides:
Key Vault (Python): Secrets/Keys/Certs
Secrets: TypeScript | Rust | Java
Keys: .NET | Java | TypeScript | Rust
Certificates: Rust
Files
- ATTRIBUTION.mdAdded by AutoGineer980 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md3.9 KiB
- references/auth-best-practices.md6.1 KiB
- references/azqr-recommendations.md5.7 KiB
- references/azqr-remediation-patterns.md7.8 KiB
- references/azure-keyvault-expiration-audit.md5.0 KiB
- references/azure-quick-review.md5.0 KiB
- references/azure-resource-graph.md2.6 KiB
- references/sdk/azure-keyvault-certificates-rust.md1013 B
- references/sdk/azure-keyvault-keys-rust.md1.3 KiB
- references/sdk/azure-keyvault-keys-ts.md1019 B
- references/sdk/azure-keyvault-py.md1.1 KiB
- references/sdk/azure-keyvault-secrets-rust.md1.3 KiB
- references/sdk/azure-keyvault-secrets-ts.md1.0 KiB
- references/sdk/azure-security-keyvault-keys-dotnet.md1.1 KiB
- references/sdk/azure-security-keyvault-keys-java.md1.3 KiB
- references/sdk/azure-security-keyvault-secrets-java.md1.5 KiB
references/azure-keyvault-expiration-audit.md
Key Vault Expiration Audit & Compliance
Automated auditing of Azure Key Vault resources to identify expired or expiring keys, secrets, and certificates before they cause service disruptions.
Overview
This skill monitors Azure Key Vault resources (keys, secrets, certificates) for expiration issues. It helps prevent service disruptions by identifying:
Expired resources causing active problems
Expiring soon (within customizable days threshold)
Missing expiration dates (security risk)
Disabled resources needing cleanup
Core Workflow
List Resources: Enumerate keys, secrets, and certificates in target vault(s)
Get Details: Retrieve expiration metadata for each resource
Analyze Status: Compare expiration dates against current date and threshold
Generate Report: Organize findings by priority with actionable recommendations
Audit Patterns
Pattern 1: Single Vault Quick Scan
Check one Key Vault for all expiration issues with configurable day threshold (default: 30 days).
Tools: keyvault_key_list, keyvault_key_get, keyvault_secret_list, keyvault_secret_get, keyvault_certificate_list, keyvault_certificate_get
Pattern 2: Multi-Vault Compliance Report
Scan multiple vaults across subscription for comprehensive security review.
Use for: Quarterly audits, organization-wide compliance checks
Pattern 3: Resource Type Focus
Audit only keys, secrets, OR certificates when specific resource type is mentioned.
Use for: Certificate renewal planning, secret rotation tracking
Pattern 4: Emergency Expired Finder
Quick scan for already-expired resources (negative days) to troubleshoot active incidents.
Use for: Production issues, authentication failures
Key Data Fields
When retrieving resource details, analyze these fields:
expiresOn: Expiration timestamp (null = no expiration set - security risk!)
enabled: Resource is active (false = disabled/inactive)
notBefore: When resource becomes valid
createdOn/updatedOn: For tracking resource age and last rotation
subject/issuer: Certificate-specific metadata
Report Format
Organize findings into:
Summary Statistics: Total count, expired count, expiring count, no-expiration count per resource type
Critical Issues: Expired resources requiring immediate action
Warnings: Expiring within threshold (e.g., 30 days)
Risks: Resources without expiration dates
Recommendations: Set expiration policies, rotate credentials, remove disabled items
Remediation Priority
🔴 Critical - Expired (< 0 days): Rotate immediately
🟠 High - Expiring 0-7 days: Schedule rotation within 24 hours
🟡 Medium - Expiring 8-30 days: Plan rotation within 1 week
🟡 Medium - No expiration set: Apply expiration policy
🟢 Low - Active (> 30 days): Monitor on regular schedule
Best Practices
Run weekly audits to catch issues early
All resources should have expiration dates (Azure Policy recommendation)
Configure Azure Event Grid for 30-day advance notifications
Rotation schedule: Secrets every 60-90 days, Keys annually, Certificates per CA requirements (max 1 year)
Prioritize production Key Vaults over dev/test
Automate rotation with Azure Functions or Logic Apps
MCP Tools Used
| Tool | Purpose |
|---|---|
keyvault_key_list | List all keys in a vault |
keyvault_key_get | Get key details including expiration |
keyvault_secret_list | List all secrets in a vault |
keyvault_secret_get | Get secret details including expiration |
keyvault_certificate_list | List all certificates in a vault |
keyvault_certificate_get | Get certificate details including expiration |
Required: vault (Key Vault name)
Optional: subscription, tenant
Fallback Strategy: Azure CLI Commands
If Azure MCP Key Vault tools fail, timeout, or are unavailable, use Azure CLI commands as fallback.
CLI Command Reference
| Operation | Azure CLI Command |
|---|---|
| List secrets | az keyvault secret list --vault-name <vault-name> |
| Get secret details | az keyvault secret show --vault-name <vault-name> --name <secret-name> |
| List keys | az keyvault key list --vault-name <vault-name> |
| Get key details | az keyvault key show --vault-name <vault-name> --name <key-name> |
| List certificates | az keyvault certificate list --vault-name <vault-name> |
| Get certificate details | az keyvault certificate show --vault-name <vault-name> --name <cert-name> |
When to Fallback
Switch to Azure CLI when:
MCP tool returns timeout error
MCP tool returns "service unavailable" or connection errors
MCP tool takes longer than 30 seconds to respond
Empty response when vault is known to have resources
Common Issues
Access Denied: Verify RBAC permissions (Key Vault Reader + data plane access)
Vault Not Found: Check vault name and subscription context
Null expiresOn: Resource has no expiration (security risk - requires policy)
Time zones: All timestamps are UTC
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
What our scanner noticed· Low risk
- Instructions that use the network
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Microsoft
- Publisher
- Microsoft (Official)
- Source
- microsoft/skills · .github/plugins/azure-skills/skills/azure-compliance · commit 0696600
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from .github/plugins/azure-skills/LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Also distributed in
- microsoft/azure-skills
AutoGineer is not affiliated with or endorsed by Microsoft or Microsoft.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download azure-compliance.zip