least-privilege-review

Audits IAM roles, service accounts, and grants against actual usage to shrink permissions.

1|Updated Jul 3, 2026
One-click install
npx skills add https://github.com/Nandansai08/skillz --skill least-privilege-review-nandansai08
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: least-privilege-review
Source: https://github.com/Nandansai08/skillz/tree/main/skills/security/least-privilege-review
Command: npx skills add https://github.com/Nandansai08/skillz --skill least-privilege-review-nandansai08

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Cloud identities accumulate far more permissions than they use — wildcard policies, convenience admin roles, and shared service accounts create blast radius that attackers and accidents exploit. This Skill provides a structured granted-versus-used review workflow that shrinks permissions safely without breaking production. ## Core Features & Use Cases - Granted-vs-Used Diffing: Ranks identities by blast radius and compares granted permissions against actual usage from CloudTrail, GCP IAM Recommender, or database query logs. - Four Classic Over-Grant Sweep: Systematically eliminates wildcards, managed convenience roles, standing human admin, and shared service accounts. - Safe Shrink Sequence: Applies reductions via dry-run, staged rollout, and AccessDenied monitoring, with schedule checks to avoid deleting quarterly or disaster-recovery permissions. - Escalation Graph Analysis: Traces transitive privilege paths like iam:PassRole and CI pipeline writes that scoped-everything audits miss. - Use Case: After a leaked access key incident, audit the CI deploy role holding AdministratorAccess, generate a scoped replacement policy from 90 days of usage data, and roll it out with zero unexplained AccessDenied events. ## Quick Start Audit our AWS IAM roles for least privilege and tell me which permissions can be safely removed based on actual usage.

Frequently Asked Questions about least-privilege-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit IAM roles for least privilege in AWS?▼

Rank identities by blast radius, then diff granted permissions against usage data from IAM Access Analyzer's last-accessed reports. Remove anything unused for 90 days after checking schedules and runbooks for quarterly or disaster-recovery jobs.

How to remove wildcard permissions without breaking production?▼

Replace wildcards by generating a scoped policy from actual usage data, then dry-run it with IAM policy simulation or staging before applying. Monitor AccessDenied rates for a week with the old policy one revert away.

What tools analyze granted versus used cloud permissions?▼

AWS IAM Access Analyzer provides last-accessed data, GCP IAM Recommender proposes shrunken roles directly, and Azure PIM offers usage insights. For databases, compare grants against query history logs.

Why do least privilege audits still fail penetration tests?▼

Tightly-scoped roles can still escalate through iam:PassRole to broad roles, Lambda write access, or CI pipeline edits. Graph analysis with tools like pmapper exposes these transitive privilege paths that direct grant reviews miss.

When should I not remove unused IAM permissions?▼

Avoid removing permissions tied to quarterly jobs, disaster-recovery paths, or annual processes that appear unused in 90-day windows. Check schedules and runbooks before every removal to prevent paging incidents.