Category: Audit
Summary
A cloud security audit methodology covering AWS, Azure, and GCP from IAM review to compliance mapping.- Phase 1 reviews IAM: wildcard permissions, unused access keys, MFA enforcement, overly permissive roles (AWS), Owner/Contributor assignments (Azure), and primitive roles on service accounts (GCP)
- Phase 2 checks storage exposure: public S3 buckets, Azure Blob containers with public access, and GCS buckets with
allUsersbindings - Phase 3 audits network security: security groups open to
0.0.0.0/0, VPC flow logs, private resources with public IPs - Phase 4 verifies logging and monitoring: CloudTrail/Activity Log coverage, retention periods, alerting on critical events, and detection service status
- Phase 5 reviews secrets management: hardcoded secrets in Lambda/Cloud Functions, plaintext config files, and key rotation policies
- Each finding maps to a CIS Benchmark control or compliance framework (ISO 27001, SOC2, PCI-DSS)
CONTEXT.md
When to Use This Context
Load this context when:- Auditing AWS, Azure, or GCP environments
- Reviewing IAM policies and permissions
- Checking for publicly exposed storage (S3, Blob, GCS)
- Assessing network security groups and firewall rules
- Reviewing logging, monitoring, and incident response readiness
Phase 1 IAM Review
AWS:- Wildcard permissions (
*) in inline or managed policies - MFA not enforced on root and IAM users
- Access keys unused for >90 days
- Overly permissive roles attached to EC2/Lambda
- Review role assignments at subscription level
- Check for Owner/Contributor roles assigned to external users
- Privileged Identity Management (PIM) are privileged roles time-bound?
- Check for primitive roles (Owner, Editor) on service accounts
- Review workload identity federation configuration
Phase 2 Storage Exposure
AWS S3:- Check containers with
PublicAccessLevel = Blob or Container
Phase 3 Network Security
- Security groups with
0.0.0.0/0on sensitive ports (22, 3389, 1433, 5432) - VPC flow logs enabled on all VPCs?
- Private resources exposed via public IPs
- Unused open ports on compute instances
- Network segmentation between environments (dev/staging/prod)
Phase 4 Logging & Monitoring
| Check | AWS | Azure | GCP |
|---|---|---|---|
| Audit logging | CloudTrail (all regions) | Activity Log | Cloud Audit Logs |
| Log retention | ≥ 90 days recommended | ≥ 90 days | ≥ 90 days |
| Threat detection | GuardDuty enabled? | Microsoft Defender? | Security Command Center? |
| Critical alerts | Root login, IAM changes, SG changes | Admin changes, login anomalies | Project IAM changes |
Phase 5 Secrets Management
- Hardcoded secrets in Lambda/Cloud Functions environment variables
- Secrets in EC2 user data scripts
- Use of secrets manager (AWS Secrets Manager / Azure Key Vault / GCP Secret Manager) vs plaintext config files
- Key rotation policy for KMS/Key Vault keys are keys rotated at least annually?
Phase 6 Reporting
Map each finding to a CIS Benchmark control or relevant compliance framework:- CIS AWS Foundations Benchmark / CIS Azure Benchmark / CIS GCP Benchmark
- ISO 27001: A.9 (Access Control), A.12 (Operations), A.13 (Communications)
- SOC2 CC6, CC7
- PCI-DSS Requirement 7 (access control), 10 (logging)
finding-writer skill for structured output. Use compliance-gap-analyzer skill to aggregate findings into a gap report.
Related contexts
web-app-pentest
Full web application pentest methodology recon, auth, authorization, injection, business logic
Rifteo-Community/contextscode-audit
Source code security review secrets, auth logic, injection sinks, crypto, dependencies
Rifteo-Community/contexts
