IAM Policy Permissions Analyzer
Review AWS IAM policy JSON for wildcard breadth, privilege paths, and policy-shape issues before validating effective access in AWS.A short IAM policy can represent a very large permission surface. Action, Resource, and Principal wildcards may cover present and future targets, while NotAction or NotResource can grant the broad remainder outside a small exclusion list. The document must be read for breadth as well as syntax.
AWS Identity and Access Management (IAM) evaluates requests using more than one JSON document. Identity policies and resource policies can contribute allows, permissions boundaries and organization policies can limit them, session policies can narrow a session, and any applicable explicit deny wins. Reviewing one policy therefore finds risky statement shapes; it cannot calculate the principal's effective access.
| Policy kind | Where it applies | Important review question |
|---|---|---|
| Identity policy | User, group, or role | Which actions and resources does this identity receive? |
| Resource policy | An AWS resource | Which principals can reach the resource, and under what conditions? |
| Permissions boundary | Maximum permissions for an identity | Does the boundary cap the intended actions without being mistaken for a grant? |
| Role trust policy | Role assumption | Which principals may assume the role? |
Least privilege means matching the required actions to the smallest supported resource and request context. Removing every wildcard is not a universal solution because some actions do not support resource-level restriction. Conditions also need service-specific validation: the presence of a condition key does not prove that the action uses it or that its value matches a real request.
Privilege paths deserve separate attention from simple breadth. Permissions to pass a role, change a policy or trust relationship, create credentials, add a resource permission, or launch infrastructure can let a principal obtain more access indirectly. A bounded static list can highlight familiar paths, but new services and combinations can create others.
A breadth score is useful for ordering a review, not approving a policy. Final verification needs AWS policy grammar checks, service authorization references, IAM Access Analyzer, simulation where applicable, and a controlled request using the intended principal, resource, and context.
How to Use This Tool:
Review one policy document in the context where it will be attached or used.
- Paste or load IAM policy JSON. The document must be a JSON object with at least one
Statement. Remove comments, trailing commas, and surrounding shell output if parsing fails. - Choose Policy kind. This changes principal-shape checks: resource and trust policies normally name a principal, while a principal is unusual in identity policies and permissions boundaries.
- Select Review lens. The lens changes only which AWS service prefixes receive sensitive-service pressure. Add local prefixes only when they reflect an approved review policy.
- Keep Wildcard pressure multiplier at 1.0 unless a documented policy requires 0.5 to 2.0. It affects Action wildcard weights, not resources, principals, pivot matches, or finding priorities.
- Investigate direct findings and the highest-scoring statements. Revise the JSON, confirm the evidence changes, then validate the policy with AWS tooling before approval.
Interpreting Results:
The statement score and finding queue answer different questions. The score combines breadth signals on an Allow statement. Findings apply fixed rules to specific patterns, so a High or Critical finding can accompany a lower score.
- Approval review needed appears when an Allow statement is High or Critical, or when a statement has a policy-shape issue. Its absence is not a safety guarantee.
- Deny statements receive the Control label and no breadth points. They still need review because an applicable explicit deny can override an allow.
- Use the statement evidence to inspect actions, resources, principals, and conditions. Service pressure only ranks concentrations for investigation.
- Verify the exact policy attached in AWS and test the intended request path; pasted JSON alone cannot reveal every contributing policy or request value.
Technical Details:
Every statement is normalized into effect, action and resource forms, principal values, condition keys, service prefixes, wildcard classes, pivot matches, and policy-kind shape issues. Only Allow statements accumulate breadth points. A missing or unsupported Effect is treated as Allow-shaped with a shape issue so malformed input is not mistaken for a harmless deny.
Formula Core
The breadth model adds applicable pressures, subtracts a limited condition credit, rounds once, and clamps the result to 0 through 100.
| Term | Condition | Contribution |
|---|---|---|
| W | Strongest Action wildcard class with multiplier m | 46m global; 32m service-wide; 18m partial; otherwise 0 |
| R | Any Resource or NotResource value contains * | 20 |
| NA | Allow uses NotAction | 30 |
| NR | Allow uses NotResource | 18 |
| Sens | s sensitive service prefixes match | 0 if s = 0; otherwise min(28, 10 + 5s) |
| Pivot | p privilege-pivot patterns match | 0 if p = 0; otherwise min(34, 18 + 4p) |
| U | No condition operator and key are present | 7 |
| P | Wildcard principal in resource or trust context | 22 |
| H | At least one policy-kind shape issue | 8 |
| C | A condition exists and the pre-credit score is greater than 8 | −6 |
Binary terms are 1 when their rule applies and 0 otherwise. Scores are nonnegative, so half-point values round upward before the 0-to-100 clamp. A condition credit recognizes only that condition structure exists; it does not validate the operator, key, value, or action support.
Service pressure is a separate ranking. It starts with the highest statement score for that service, then adds concentration signals.
M is the service's maximum statement score; A, R, and U count Allow statements with action wildcards, resource wildcards, and no conditions. Service pressure never changes a statement score or finding.
Lookup Core
The review lens supplies the sensitive service set. Valid additional prefixes extend the selected row.
| Lens | Service prefixes |
|---|---|
| Least privilege | iam, sts, organizations, kms, cloudtrail, s3, secretsmanager |
| CI/CD deploy | iam, sts, cloudformation, lambda, ecr, ecs, eks, kms, secretsmanager |
| Read only | iam, s3, kms, secretsmanager, organizations, cloudtrail |
| Resource exposure | iam, sts, kms, s3, lambda, sqs, sns, secretsmanager |
The bounded privilege-pivot lookup covers these exact patterns:
iam:PassRole,iam:CreatePolicyVersion,iam:AttachRolePolicy,iam:PutRolePolicy,iam:UpdateAssumeRolePolicy,iam:CreateAccessKey, andiam:UpdateLoginProfilests:AssumeRole,organizations:*,kms:PutKeyPolicy,s3:PutBucketPolicy, andlambda:AddPermissioncloudformation:CreateStack,cloudformation:UpdateStack, andec2:AuthorizeSecurityGroupIngress
Matching is case-insensitive and honors * and ? wildcards in an action being reviewed. The list is intentionally finite and must not be read as a complete catalog of escalation paths.
Rule Core
| Level | Boundary | Meaning |
|---|---|---|
| Low | S < 25 | Continue normal IAM review and request testing |
| Medium | 25 ≤ S < 50 | Check least-privilege fit and supported conditions |
| High | 50 ≤ S < 75 | Tighten wildcard and scope evidence |
| Critical | S ≥ 75 | Resolve broad access before approval |
| Control | Deny statement | Verify the guardrail and its request context |
Direct findings do not inherit those bands. They use the following fixed triggers:
| Finding | Priority | Trigger |
|---|---|---|
| Global action wildcard | Critical | Allow action is * or *:* |
| Service-wide action wildcard | High | Allow action matches service:* |
| Partial action wildcard | Medium | Another Allow action contains a wildcard |
| Wildcard resource | High | Allow Resource or NotResource contains * |
| Allow with NotAction / NotResource | High / Review | The corresponding exclusion element is present |
| Privilege-pivot action | Critical | An Allow action matches the bounded pivot lookup |
| Sensitive service | Review | An Allow touches the selected or extended service set |
| Unconditioned broad allow | Medium | An Allow has S ≥ 25 and no condition |
| Wildcard principal | Critical | A resource or trust Allow has a wildcard principal |
| Policy shape issue | Review | Required statement elements are missing or conflict with policy kind |
Policy input accepts 1 to 2,000 statements in a document no larger than 2 MiB. The visible statement limit of 10 to 300 changes only the displayed ledger; all statements still contribute to counts, findings, service totals, and rankings.
Limitations and Privacy:
Policy parsing and scoring remain in the browser, and no AWS account is queried. The label and JSON are excluded from the share URL, but copied or downloaded evidence may contain account IDs, role names, resource names, principals, and organization details.
- The breadth model is a repository-authored heuristic, not an AWS authorization result, risk score, or approval decision.
- Condition presence does not establish service support, correct operators, or matching request values.
- The sensitive-service and pivot lookups cannot cover every service-specific access path.
- Effective permissions may change through policies and controls outside the supplied document.
- Use IAM Access Analyzer and service-specific testing before applying a policy to a production identity or resource.
References:
- IAM JSON policy element reference, Amazon Web Services.
- Policy evaluation logic, Amazon Web Services.
- Validate policies with IAM Access Analyzer, Amazon Web Services.