Security skill · Find and fix
Cloud IAM and storage exposure review: AWS, GCP, Azure.
Review AWS, Google Cloud, and Azure accounts for over-broad identity and access management and publicly exposed storage by inventorying principals, policies, trust relationships, buckets and blobs, snapshots, and public endpoints with read-only commands, then tighten access and verify from allowed and denied identities. Use when auditing a cloud account, investigating a possible data exposure, or reviewing IAM and storage changes.
Facts
- Category
- Find and fix
- License
- MIT
- Tags
- Misconfiguration
- Version
- 1.0.0
- Last updated
- 2026-12-02
- Folder
cloud-iam-storage-exposure-review/- MCP resource
skill://cloud-iam-storage-exposure-review/SKILL.md- Files
- SKILL.md
- LICENSE
- references/provider-commands.md
Original Saasment content. Saasment is in early access; this skill does not require joining it.
Install via MCP or as files
Connect your client to https://www.saasment.com/api/mcp (see client setup) and call get_skill:
{
"name": "get_skill",
"arguments": {
"slug": "cloud-iam-storage-exposure-review"
}
}Or download the .zip and unpack it into your agent's skills directory:
Terminal, from your project root (user-level: ~/.cursor/skills)
mkdir -p .cursor/skills
curl -fsSL https://www.saasment.com/ai-security/skills/cloud-iam-storage-exposure-review/download.zip -o /tmp/cloud-iam-storage-exposure-review.zip
unzip -o /tmp/cloud-iam-storage-exposure-review.zip -d .cursor/skills
# result: .cursor/skills/cloud-iam-storage-exposure-review/SKILL.mdReview SKILL.md before enabling a skill. Skills are instructions your agent will follow.
SKILL.md
--- name: cloud-iam-storage-exposure-review description: Review AWS, Google Cloud, and Azure accounts for over-broad identity and access management and publicly exposed storage by inventorying principals, policies, trust relationships, buckets and blobs, snapshots, and public endpoints with read-only commands, then tighten access and verify from allowed and denied identities. Use when auditing a cloud account, investigating a possible data exposure, or reviewing IAM and storage changes. license: MIT metadata: author: Saasment version: "1.0.0" category: both tags: "misconfiguration" --- # Cloud IAM and storage exposure review: AWS, GCP, Azure (find and fix) License: MIT. Copyright (c) 2026 Saasment. Source: https://www.saasment.com/ai-security/skills/cloud-iam-storage-exposure-review Two cloud mistakes account for many data exposures: an identity that can do far more than its job needs, and a storage location that anyone on the internet can read. Both are visible in configuration, so they can be found with read-only commands and fixed with small policy and setting changes. This skill covers a live account review. For infrastructure-as-code files, use `terraform-iac-security-review` and `iac-misconfig-review`. ## When to use - You audit an AWS account, GCP project or organization, or Azure subscription. - You suspect a bucket, container, snapshot, or database is public. - A change adds roles, service accounts, cross-account trust, or storage. ## Safe by default - Review only accounts, projects, and subscriptions you own or are authorized to assess. Get written scope before you start. - Use a dedicated read-only review identity (for example the provider's built-in read-only or security-reader roles) and short-lived credentials. Do not use administrator credentials for discovery. - Run only list, get, and describe style commands. Do not change settings, delete resources, or read object contents during discovery. To test public access, request an object's metadata or an anonymous listing from a bucket you own, not content from others. - Keep results in an access-controlled location. Account identifiers, role names, and bucket names are sensitive. - Make fixes through your normal change process, one at a time, with a rollback plan. Changing a policy can break applications. ## Procedure 1. **Define scope.** List accounts, projects, subscriptions, regions, and environments. Record the review identity and the date. Command starting points per provider are in `references/provider-commands.md`. 2. **Inventory identities.** Human users, groups, roles, service accounts, managed identities, workload identities, and API keys. Note last-used time, MFA status for humans, and whether long-lived access keys exist. 3. **Find over-broad grants.** Look for administrator or owner roles, wildcard actions and resources, grants at the organization or root level, roles that allow privilege escalation (creating or attaching policies, impersonating other identities, passing roles to compute), and inherited grants that are broader than intended. 4. **Review trust relationships.** Cross-account and cross-project trust, roles assumable by any principal, external identity federation, and service accounts that other identities can impersonate. Each trust should name a specific principal and, where supported, a condition. 5. **Find unused access.** Roles, keys, and service accounts not used within your chosen window (for example 90 days), users who left, and test or default identities. 6. **Inventory storage and data stores.** Buckets, containers, file shares, disk and database snapshots and backups, databases and queues with public endpoints, and static website hosting. Note encryption, versioning, logging, and who can read each one. 7. **Test for public exposure.** Check account-level and resource-level public access settings, resource policies and ACLs that grant access to all users or all authenticated users, shared snapshots and images, signed-URL policies, and firewall rules that allow the whole internet. Classify each public item as intentional (a deliberate public website or download bucket) or accidental. 8. **Triage.** For each finding record resource, provider, exposure (public, cross-account, internal), data sensitivity, owner, and whether it is intentional. Fix public sensitive data first, then identities with escalation paths, then unused access. 9. **Fix.** Turn on account-level block-public-access settings, remove public grants, replace wildcard permissions with specific actions and resources, add conditions (source network, MFA, tags), delete unused keys, and prefer short-lived credentials and workload identity over long-lived keys. 10. **Prevent recurrence.** Set organization-level guardrails (service control policies, organization policies, Azure Policy), enable provider access-analysis and findings services, send audit logs to a protected location, and alert on policy changes and on new public resources. ## Verification - Confirm a public-exposure finding from outside: with no credentials, request the object or listing URL of a bucket you own and record the response. Confirm the fix with the same request returning an access-denied response, and confirm the legitimate consumer (the application identity or CDN) still works. - Confirm an over-broad grant by running the provider's policy simulator or access analyzer for the identity against a few sensitive actions. After the change, re-run it and confirm the sensitive actions are denied and the required ones are allowed. - Confirm trust fixes by attempting to assume the role or impersonate the service account from an identity that should be denied (in a test account) and from the allowed one. - Confirm unused-access cleanup by checking last-used data before deleting, and watch logs for denied calls after the change. - Confirm guardrails by attempting, in a scratch project, to create a public bucket or an overly broad role and verifying the organization policy blocks it. ## Reporting Table: finding id, provider and account, resource, risk, intentional or accidental, fix, verification result, owner. Add the list of scopes not reviewed and tools that could not be run. ## References - AWS IAM Access Analyzer: https://docs.aws.amazon.com/IAM/latest/UserGuide/what-is-access-analyzer.html - AWS S3 Block Public Access: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html - Google Cloud IAM documentation: https://cloud.google.com/iam/docs/ - Google Cloud storage public access prevention: https://cloud.google.com/storage/docs/public-access-prevention - Azure role-based access control overview: https://learn.microsoft.com/azure/role-based-access-control/overview - Azure: prevent anonymous read access to blob data: https://learn.microsoft.com/azure/storage/blobs/anonymous-read-access-prevent - Companion skills: `terraform-iac-security-review`, `iac-misconfig-review`, `secrets-in-repo-scan-and-rotation`, `ssrf-find-and-fix`.
Helper files
LICENSE
MIT License Copyright (c) 2026 Saasment Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
references/provider-commands.md
# Read-only commands by provider
License: MIT. Copyright (c) 2026 Saasment.
Run these only in accounts you are authorized to assess, with a read-only review identity. Command names and flags change between CLI versions; check `--help`. Commands below only list or describe resources.
## AWS (AWS CLI)
```bash
# Who am I, and which account
aws sts get-caller-identity
# Account-level S3 public access settings
aws s3control get-public-access-block --account-id <account-id>
# Buckets, then per-bucket public access and policy status
aws s3api list-buckets --query 'Buckets[].Name'
aws s3api get-public-access-block --bucket <bucket>
aws s3api get-bucket-policy-status --bucket <bucket>
aws s3api get-bucket-acl --bucket <bucket>
# IAM overview, including users with keys and MFA state
aws iam generate-credential-report && aws iam get-credential-report
aws iam get-account-authorization-details > /tmp/iam-details.json
# Findings from IAM Access Analyzer (external and unused access)
aws accessanalyzer list-analyzers
aws accessanalyzer list-findings-v2 --analyzer-arn <analyzer-arn>
# Public snapshots and images you own
aws ec2 describe-snapshots --owner-ids self --restorable-by-user-ids all
aws ec2 describe-images --owners self --filters Name=is-public,Values=true
# Security groups open to the world
aws ec2 describe-security-groups --filters Name=ip-permission.cidr,Values=0.0.0.0/0
```
## Google Cloud (gcloud)
```bash
# Active identity and project
gcloud auth list
gcloud config get-value project
# IAM bindings on a project, flattened to find owners, editors, and public members
gcloud projects get-iam-policy <project-id> --format=json > /tmp/gcp-iam.json
# Look for members "allUsers" and "allAuthenticatedUsers" and roles/owner or roles/editor
# Service accounts and their keys
gcloud iam service-accounts list
gcloud iam service-accounts keys list --iam-account <sa-email>
# Buckets: public access prevention, uniform access, and IAM
gcloud storage buckets list --format="value(name)"
gcloud storage buckets describe gs://<bucket> --format="yaml(iamConfiguration)"
gcloud storage buckets get-iam-policy gs://<bucket>
# Firewall rules open to the internet
gcloud compute firewall-rules list --filter="sourceRanges:0.0.0.0/0" --format="table(name,direction,allowed)"
# IAM recommendations for unused or excessive permissions
gcloud recommender recommendations list --recommender=google.iam.policy.Recommender \
--project=<project-id> --location=global
```
## Azure (Azure CLI)
```bash
# Active identity and subscription
az account show
# Role assignments at subscription scope; look for Owner and Contributor on broad scopes
az role assignment list --all --include-inherited --output table
# Storage accounts and public access settings
az storage account list --query '[].{name:name, publicBlob:allowBlobPublicAccess, https:supportsHttpsTrafficOnly, minTls:minimumTlsVersion}' --output table
az storage container list --account-name <account> --auth-mode login --query '[].{name:name, access:properties.publicAccess}' --output table
# Network security groups with rules open to the internet
az network nsg list --query '[].{name:name, rg:resourceGroup}' --output table
az network nsg rule list --nsg-name <nsg> --resource-group <rg> --output table
# Key vault access model and network exposure
az keyvault list --query '[].{name:name, rbac:properties.enableRbacAuthorization, publicAccess:properties.publicNetworkAccess}' --output table
```
## Patterns that deserve a closer look
| Pattern | Provider terms | Why it matters |
| --- | --- | --- |
| Public principal in a policy | AWS `"Principal": "*"`; GCP `allUsers`, `allAuthenticatedUsers`; Azure anonymous container access | Anyone, or any signed-in user of the provider, can reach the resource |
| Wildcard permissions | AWS `"Action": "*"`, `"Resource": "*"`; GCP primitive roles Owner and Editor; Azure Owner at broad scope | One compromised identity gets the whole account |
| Permission to grant permissions | AWS policy attach and create actions, pass-role; GCP set-IAM-policy and service-account impersonation; Azure role assignment write | Lets an identity raise its own access |
| Trust without conditions | AWS role trusting a whole account or `*`; GCP broad workload identity pools; Azure multi-tenant app consent | Unrelated identities can assume the role |
| Long-lived keys | AWS access keys; GCP service account keys; Azure client secrets | Leak and stay valid until rotated |
| Shared or public backups | Snapshots, images, database backups shared with all | Full data copy for anyone |
| Public data stores | Databases, search clusters, queues with public endpoints and no IP restrictions | Direct internet access to data |
## Triage template
| Field | Value |
| --- | --- |
| Resource and account | |
| What is exposed or over-granted | |
| Who can reach it (internet, any provider user, cross-account, internal) | |
| Data sensitivity | |
| Intentional? Owner? | |
| Fix and rollback | |
| Verification (outside request, simulator, assume-role test) | |
Related
Companion skills
Questions
How do I install the Cloud IAM and storage exposure review: AWS, GCP, Azure skill?
Download https://www.saasment.com/ai-security/skills/cloud-iam-storage-exposure-review/download.zip and unzip it into your agent's skills directory (for example .cursor/skills, .claude/skills, .agents/skills, or .github/skills) so that cloud-iam-storage-exposure-review/SKILL.md exists. Or connect to https://www.saasment.com/api/mcp and call the get_skill tool with the slug cloud-iam-storage-exposure-review.
What license is the Cloud IAM and storage exposure review: AWS, GCP, Azure skill under?
It is original Saasment content under the MIT license, stated in the SKILL.md frontmatter and in the LICENSE file in the skill folder.
Is it safe to run this skill?
A skill is a set of instructions your agent follows, so read SKILL.md first. It tells the agent to test only systems you own or are authorized to test, to use test environments and synthetic data, and to avoid destructive probes. Downloading it does not run any code on your machine.