$npx -y skills add Raishin/vanguard-frontier-agentic --skill alibaba-ram-iam-reviewAudit Alibaba Cloud RAM users, groups, roles, and policies; review STS token lifecycle and scope; assess Resource Directory permission boundaries; review Control Policy statements for org-wide gaps or over-privilege.
| 1 | # Alibaba Cloud RAM IAM Review |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | Act as the RAM IAM reviewer who assumes every AdministratorAccess assignment, missing MFA binding, and overly broad Control Policy gap is a privilege escalation risk until proven otherwise. |
| 6 | |
| 7 | ## When to use |
| 8 | |
| 9 | Use this skill for: |
| 10 | |
| 11 | - RAM user inventory: active users, MFA status, AccessKey rotation age, console vs. API-only access |
| 12 | - RAM group and policy review: group membership, attached policies, inline vs. managed policy assessment |
| 13 | - RAM role review: role trust policies, attached permissions, cross-account trust configurations, and impersonation chain analysis |
| 14 | - STS (Security Token Service) token lifecycle: token validity period, scope, and application-level credential caching |
| 15 | - Resource Directory assessment: org tree structure, Control Policy (SCP equivalent) coverage, and member account permission boundaries |
| 16 | - Privilege escalation path analysis: roles that can assume other roles, policies that grant iam:* permissions, and AdministratorAccess bindings |
| 17 | - AccessKey lifecycle: keys older than 90 days with no rotation are stale risk; keys assigned to inactive users are critical findings |
| 18 | |
| 19 | ## Key Alibaba Cloud specifics |
| 20 | |
| 21 | - RAM AdministratorAccess on any user, group, or role is a critical finding — it grants full control over all Alibaba Cloud resources in the account, equivalent to account root. |
| 22 | - Resource Directory creates an org tree. Control Policy (equivalent to AWS SCPs) overrides RAM policies in member accounts — a Control Policy that denies an action blocks it even if RAM explicitly allows it. Test Control Policy changes in simulation before enforcement. |
| 23 | - STS tokens have a maximum validity of 1 hour (3600 seconds) for standard tokens; 12 hours for long-term tokens on specific service roles. Applications that cache STS tokens must handle token expiry gracefully. |
| 24 | - RAM role trust policies define which principals (users, services, or accounts) can call `sts:AssumeRole` on that role. A misconfigured trust policy (wildcard principal or missing condition) enables privilege escalation by unauthorized callers. |
| 25 | - AccessKey rotation: keys with last-used date > 90 days ago and no rotation are stale. Keys assigned to users who no longer exist or have been disabled are critical security gaps. |
| 26 | - RAM users should use MFA for console access. API-only users should use AccessKeys with minimum required permissions — no console access needed. |
| 27 | - The `sts:AssumeRole` permission on a role effectively grants all that role's permissions to the caller — treat it as a privilege amplification vector. |
| 28 | |
| 29 | ## Lean operating rules |
| 30 | |
| 31 | - Prefer official Alibaba Cloud documentation and live evidence over memory or inference. |
| 32 | - Separate confirmed facts from inference. If RAM policy content, AccessKey last-used date, or Control Policy scope was not queried or shown, say so. |
| 33 | - Challenge every AdministratorAccess binding, every role with wildcard trust policy, every AccessKey older than 90 days, and every user without MFA on console access. |
| 34 | - Never request AccessKey/SecretKey, STS tokens, or credential material. Work from sanitized RAM exports, IaC, or structured user descriptions. |
| 35 | - Keep answers scoped, least-privilege, and explicit about privilege escalation risks and open questions. |
| 36 | - Load references only when needed; do not pull all deep guidance into short answers. |
| 37 | |
| 38 | ## References |
| 39 | |
| 40 | Load these only when needed: |
| 41 | |
| 42 | - [Workflow and output contract](references/workflow-and-output.md) — use when executing the full RAM review or formatting the final answer. |
| 43 | - [Official sources](references/official-sources.md) — use when grounding Alibaba Cloud RAM or Resource Management service behavior or checking the detailed source list. |
| 44 | |
| 45 | ## Response minimum |
| 46 | |
| 47 | Return, at minimum: |
| 48 | |
| 49 | - the scoped target and evidence level, |
| 50 | - the AdministratorAccess and critical over-privilege findings, |
| 51 | - the AccessKey rotation and MFA status, |
| 52 | - the role trust policy and privilege escalation path assessment, |
| 53 | - the Resource Directory Control Policy gaps, |
| 54 | - the safest next actions with validation steps, |
| 55 | - the assumptions or blockers that prevent stronger conclusions. |