Works with the AI Agents you already use
Azure RBAC Security Audit
by CashonlyTian
- **Identifies escalation paths** such as `roleAssignments/write` permissions, VM `runCommand` access, or Managed Identity Operator chains.
$7
Azure RBAC Security Audit
Example session with this skill installed
Audit the Azure RBAC exports in the ./deploy/security-dump folder for the 'production-core' subscription. Use the brand 'Internal Audit Team'.
- Read your context and instructions
- Compiled the azure rbac security
- Generated the document
The Azure RBAC audit for
production-core is complete. The subscription received a failing grade due to multiple high-severity privilege escalation paths and over-privileged guest accounts.
Audit Summary
- Score: 7/100
- Grade: F
- Risk Level: CRITICAL
- Findings: 15 Critical, 19 High, 19 Medium, 1 Low (54 total)
Top 3 Priority Fixes
Remove Subscription-Level Owners: Three guest users (#EXT#) hold the Owner role at the subscription scope. Move these to specific Resource Groups.
2.
Close Escalation Paths: The 'Deployment-SA' custom role contains Microsoft.Authorization/roleAssignments/write. This allows the principal to grant itself any role.
3. Rotate Service Principal Keys: 5 service principals have credentials older than 365 days or set to never expire.
Security Scorecard
The scorecard image scan-2025-05-20.png has been generated in the output directory.
Detailed Findings
| Check | Score | Status | Finding |
|---|---|---|---|
| owner_scope | 0/15 | FAIL | 4 assignments found at subscription scope |
| contributor_scope | 5/15 | WARN | 2 Contributor roles at management group scope |
| guest_external | 0/10 | FAIL | Guest user 'external_dev' has Contributor rights |
| privilege_escalation | 0/10 | FAIL | Found roleAssignments/write in custom role 'AppAdmin' |
| sp_credentials | 5/10 | WARN | 3 secrets older than 90 days (appId: 882b-...) |
| key_vault_access | 10/10 | PASS | Soft-delete and purge protection enabled on all vaults |
| custom_role_actions | 2/10 | FAIL | Wildcard '*' found in 2 custom definitions |
| conditions_missing | 5/5 | PASS | All sensitive roles use ABAC conditions |
| stale_assignments | 10/10 | PASS | No orphaned principals detected |
| audit_logging | 5/5 | PASS | Administrative logs exported to Log Analytics |
Next steps
- Review
scan-report.mdfor the exact line numbers in your JSON/TF files. - Apply the scope reductions to the 'production-core' Terraform modules.
- Re-run the audit after fixes to confirm the new score.
Clean Demo
- Score: 100/100
- Grade: A
- Findings: 0
scan-2025-05-20.png
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Granting broad Azure permissions is a fast way to lose control of a subscription. This skill audits Azure RBAC role assignments and definitions to identify over-privileged accounts, privilege escalation paths, and stale credentials before they are deployed.
What it does
- Detects over-privileged roles by flagging Owner, Contributor, or User Access Administrator assignments at subscription or management group scopes.
- Identifies escalation paths such as
roleAssignments/writepermissions, VMrunCommandaccess, or Managed Identity Operator chains. - Audits service principals for credentials older than 90 days, expired secrets, or entries that never expire.
- Secures Key Vaults by checking for public network access, disabled purge protection, and broad secret access granted to groups or guests.
- Scans custom roles for wildcard actions, dangerous data actions, or subscription-wide assignable scopes.
- Generates security scores providing a 0-100 grade, risk level, and a prioritized fix report with a shareable scorecard image.
How it works
- Point to local data by providing a folder containing saved
azCLI JSON outputs or Terraform files. - Fetch missing data using the included helper script if you do not already have the role assignment and definition exports.
- Run the audit locally to analyze the files without granting the agent any Azure API access or network permissions.
- Review the scorecard to see the 10-point check results, grade, and top three high-priority fixes.
Frameworks & tools
This skill works with Azure CLI JSON outputs (az role assignment, az ad app credential, az keyvault list) and Terraform (azurerm provider) resources.
Why this beats prompting it yourself
Generic prompts often miss complex privilege escalation chains, like a Managed Identity that can assign roles to itself. This skill uses a structured 10-point scoring system and local scripts to ensure every assignment is checked against specific security benchmarks without leaking secrets to the LLM.
Use cases
- Audit a set of role assignments generated by another AI agent before applying them.
- Perform a security baseline check on a newly onboarded third-party subscription.
- Generate a shareable security scorecard for client reports or internal PR reviews.
- Identify orphaned or stale assignments for users who no longer exist in the directory.
Known limitations
Audits saved files only and cannot detect manual changes made in the Azure Portal that were not exported. Guest detection requires exports to include principal names.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.
Audits saved files only, not live environments. Does not resolve variables in Terraform modules. Requires specific az CLI JSON formats or azurerm HCL resources.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 4 days ago
- Software
Python 3Pillow