[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M758CSTKXQVTENM563G81EMN":3,"skill-same:01M758CSTKXQVTENM563G81EMN":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M758CSTKXQVTENM563G81EMN","cloud-security",null,"Use when assessing cloud infrastructure for security misconfigurations, IAM privilege escalation paths, S3 public exposure, open security group rules, or IaC security gaps. Covers AWS, Azure, and GCP posture assessment with MITRE ATT&CK mapping.","kruxshnx\u002Fclaude-skills-devin","kruxshnx","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F127938788?v=4","01M757YM3F96N4K1BSE7Z0NQK7","ARJANGI GOVINDA KRISHNA","01M757YM43H5T7MP2B3DC13GZ2",2,"MIT","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002F.devin\u002Fskills\u002Fcloud-security\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: \"cloud-security\"\ndescription: \"Use when assessing cloud infrastructure for security misconfigurations, IAM privilege escalation paths, S3 public exposure, open security group rules, or IaC security gaps. Covers AWS, Azure, and GCP posture assessment with MITRE ATT&CK mapping.\"\n---\n\n# Cloud Security\n\nCloud security posture assessment skill for detecting IAM privilege escalation, public storage exposure, network configuration risks, and infrastructure-as-code misconfigurations. This is NOT incident response for active cloud compromise (see incident-response) or application vulnerability scanning (see security-pen-testing) — this is about systematic cloud configuration analysis to prevent exploitation.\n\n---\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Cloud Posture Check Tool](#cloud-posture-check-tool)\n- [IAM Policy Analysis](#iam-policy-analysis)\n- [S3 Exposure Assessment](#s3-exposure-assessment)\n- [Security Group Analysis](#security-group-analysis)\n- [IaC Security Review](#iac-security-review)\n- [Cloud Provider Coverage Matrix](#cloud-provider-coverage-matrix)\n- [Workflows](#workflows)\n- [Anti-Patterns](#anti-patterns)\n- [Cross-References](#cross-references)\n\n---\n\n## Overview\n\n### What This Skill Does\n\nThis skill provides the methodology and tooling for **cloud security posture management (CSPM)** — systematically checking cloud configurations for misconfigurations that create exploitable attack surface. It covers IAM privilege escalation paths, storage public exposure, network over-permissioning, and infrastructure code security.\n\n### Distinction from Other Security Skills\n\n| Skill | Focus | Approach |\n|-------|-------|----------|\n| **cloud-security** (this) | Cloud configuration risk | Preventive — assess before exploitation |\n| incident-response | Active cloud incidents | Reactive — triage confirmed cloud compromise |\n| threat-detection | Behavioral anomalies | Proactive — hunt for attacker activity in cloud logs |\n| security-pen-testing | Application vulnerabilities | Offensive — actively exploit found weaknesses |\n\n### Prerequisites\n\nRead access to IAM policy documents, S3 bucket configurations, and security group rules in JSON format. For continuous monitoring, integrate with cloud provider APIs (AWS Config, Azure Policy, GCP Security Command Center).\n\n---\n\n## Cloud Posture Check Tool\n\nThe `cloud_posture_check.py` tool runs three types of checks: `iam` (privilege escalation), `s3` (public access), and `sg` (network exposure). It auto-detects the check type from the config file structure or accepts explicit `--check` flags.\n\n```bash\n# Analyze an IAM policy for privilege escalation paths\npython3 scripts\u002Fcloud_posture_check.py policy.json --check iam --json\n\n# Assess S3 bucket configuration for public access\npython3 scripts\u002Fcloud_posture_check.py bucket_config.json --check s3 --json\n\n# Check security group rules for open admin ports\npython3 scripts\u002Fcloud_posture_check.py sg.json --check sg --json\n\n# Run all checks with internet-facing severity bump\npython3 scripts\u002Fcloud_posture_check.py config.json --check all \\\n  --provider aws --severity-modifier internet-facing --json\n\n# Regulated data context (bumps severity by one level for all findings)\npython3 scripts\u002Fcloud_posture_check.py config.json --check all \\\n  --severity-modifier regulated-data --json\n\n# Pipe IAM policy from AWS CLI\naws iam get-policy-version --policy-arn arn:aws:iam::123456789012:policy\u002FMyPolicy \\\n  --version-id v1 | jq '.PolicyVersion.Document' | \\\n  python3 scripts\u002Fcloud_posture_check.py - --check iam --json\n```\n\n### Exit Codes\n\n| Code | Meaning | Required Action |\n|------|---------|-----------------|\n| 0 | No high\u002Fcritical findings | No action required |\n| 1 | High-severity findings | Remediate within 24 hours |\n| 2 | Critical findings | Remediate immediately — escalate to incident-response if active |\n\n---\n\n## IAM Policy Analysis\n\nIAM analysis detects privilege escalation paths, overprivileged grants, public principal exposure, and data exfiltration risk.\n\n### Privilege Escalation Patterns\n\n| Pattern | Severity | Key Action Combination | MITRE |\n|---------|----------|------------------------|-------|\n| Lambda PassRole escalation | Critical | iam:PassRole + lambda:CreateFunction | T1078.004 |\n| EC2 instance profile abuse | Critical | iam:PassRole + ec2:RunInstances | T1078.004 |\n| CloudFormation PassRole | Critical | iam:PassRole + cloudformation:CreateStack | T1078.004 |\n| Self-attach policy escalation | Critical | iam:AttachUserPolicy + sts:GetCallerIdentity | T1484.001 |\n| Inline policy self-escalation | Critical | iam:PutUserPolicy + sts:GetCallerIdentity | T1484.001 |\n| Policy version backdoor | Critical | iam:CreatePolicyVersion + iam:ListPolicies | T1484.001 |\n| Credential harvesting | High | iam:CreateAccessKey + iam:ListUsers | T1098.001 |\n| Group membership escalation | High | iam:AddUserToGroup + iam:ListGroups | T1098 |\n| Password reset attack | High | iam:UpdateLoginProfile + iam:ListUsers | T1098 |\n| Service-level wildcard | High | iam:* or s3:* or ec2:* | T1078.004 |\n\n### IAM Finding Severity Guide\n\n| Finding Type | Condition | Severity |\n|-------------|-----------|----------|\n| Full admin wildcard | Action=* Resource=* | Critical |\n| Public principal | Principal: '*' | Critical |\n| Dangerous action combo | Two-action escalation path | Critical |\n| Individual priv-esc actions | On wildcard resource | High |\n| Data exfiltration actions | s3:GetObject, secretsmanager:GetSecretValue on * | High |\n| Service wildcard | service:* action | High |\n| Data actions on named resource | Appropriate scope | Low\u002FClean |\n\n### Least Privilege Recommendations\n\nFor every critical or high finding, the tool outputs a `least_privilege_suggestion` field with specific remediation guidance:\n- Replace `Action: *` with a named list of required actions\n- Replace `Resource: *` with specific ARN patterns\n- Use AWS Access Analyzer to identify actually-used permissions\n- Separate dangerous action combinations into different roles with distinct trust policies\n\n---\n\n## S3 Exposure Assessment\n\nS3 assessment checks four dimensions: public access block configuration, bucket ACL, bucket policy principal exposure, and default encryption.\n\n### S3 Configuration Check Matrix\n\n| Check | Finding Condition | Severity |\n|-------|------------------|----------|\n| Public access block | Any of four flags missing\u002Ffalse | High |\n| Bucket ACL | public-read-write | Critical |\n| Bucket ACL | public-read or authenticated-read | High |\n| Bucket policy Principal | \"Principal\": \"*\" with Allow | Critical |\n| Default encryption | No ServerSideEncryptionConfiguration | High |\n| Default encryption | Non-standard SSEAlgorithm | Medium |\n| No PublicAccessBlockConfiguration | Status unknown | Medium |\n\n### Recommended S3 Baseline Configuration\n\n```json\n{\n  \"PublicAccessBlockConfiguration\": {\n    \"BlockPublicAcls\": true,\n    \"BlockPublicPolicy\": true,\n    \"IgnorePublicAcls\": true,\n    \"RestrictPublicBuckets\": true\n  },\n  \"ServerSideEncryptionConfiguration\": {\n    \"Rules\": [{\n      \"ApplyServerSideEncryptionByDefault\": {\n        \"SSEAlgorithm\": \"aws:kms\",\n        \"KMSMasterKeyID\": \"arn:aws:kms:region:account:key\u002Fkey-id\"\n      },\n      \"BucketKeyEnabled\": true\n    }]\n  },\n  \"ACL\": \"private\"\n}\n```\n\nAll four public access block settings must be enabled at both the bucket level and the AWS account level. Account-level settings can be overridden by bucket-level settings if not both enforced.\n\n---\n\n## Security Group Analysis\n\nSecurity group analysis flags inbound rules that expose admin ports, database ports, or all traffic to internet CIDRs (0.0.0.0\u002F0, ::\u002F0).\n\n### Critical Port Exposure Rules\n\n| Port | Service | Finding Severity | Remediation |\n|------|---------|-----------------|-------------|\n| 22 | SSH | Critical | Restrict to VPN CIDR or use AWS Systems Manager Session Manager |\n| 3389 | RDP | Critical | Restrict to VPN CIDR or use AWS Fleet Manager |\n| 0–65535 (all) | All traffic | Critical | Remove rule; add specific required ports only |\n\n### High-Risk Database Port Rules\n\n| Port | Service | Finding Severity | Remediation |\n|------|---------|-----------------|-------------|\n| 1433 | MSSQL | High | Allow from application tier SG only — move to private subnet |\n| 3306 | MySQL | High | Allow from application tier SG only — move to private subnet |\n| 5432 | PostgreSQL | High | Allow from application tier SG only — move to private subnet |\n| 27017 | MongoDB | High | Allow from application tier SG only — move to private subnet |\n| 6379 | Redis | High | Allow from application tier SG only — move to private subnet |\n| 9200 | Elasticsearch | High | Allow from application tier SG only — move to private subnet |\n\n### Severity Modifiers\n\nUse `--severity-modifier internet-facing` when the assessed resource is directly internet-accessible (load balancer, API gateway, public EC2). Use `--severity-modifier regulated-data` when the resource handles PCI, HIPAA, or GDPR-regulated data. Both modifiers bump each finding's severity by one level.\n\n---\n\n## IaC Security Review\n\nInfrastructure-as-code review catches configuration issues at definition time, before deployment.\n\n### IaC Check Matrix\n\n| Tool | Check Types | When to Run |\n|------|-------------|-------------|\n| Terraform | Resource-level checks (aws_s3_bucket_acl, aws_security_group, aws_iam_policy_document) | Pre-plan, pre-apply, PR gate |\n| CloudFormation | Template property validation (PublicAccessBlockConfiguration, SecurityGroupIngress) | Template lint, deploy gate |\n| Kubernetes manifests | Container privileges, network policies, secret exposure | PR gate, admission controller |\n| Helm charts | Same as Kubernetes | PR gate |\n\n### Terraform IAM Policy Example — Finding vs. Clean\n\n```hcl\n# BAD: Will generate critical findings\nresource \"aws_iam_policy\" \"bad_policy\" {\n  policy = jsonencode({\n    Version = \"2012-10-17\"\n    Statement = [{\n      Effect   = \"Allow\"\n      Action   = \"*\"\n      Resource = \"*\"\n    }]\n  })\n}\n\n# GOOD: Least privilege\nresource \"aws_iam_policy\" \"good_policy\" {\n  policy = jsonencode({\n    Version = \"2012-10-17\"\n    Statement = [{\n      Effect   = \"Allow\"\n      Action   = [\"s3:GetObject\", \"s3:PutObject\"]\n      Resource = \"arn:aws:s3:::my-specific-bucket\u002F*\"\n    }]\n  })\n}\n```\n\nFull CSPM check reference: `references\u002Fcspm-checks.md`\n\n---\n\n## Cloud Provider Coverage Matrix\n\n| Check Type | AWS | Azure | GCP |\n|-----------|-----|-------|-----|\n| IAM privilege escalation | Full (IAM policies, trust policies, ESCALATION_COMBOS) | Partial (RBAC assignments, service principal risks) | Partial (IAM bindings, workload identity) |\n| Storage public access | Full (S3 bucket policies, ACLs, public access block) | Partial (Blob SAS tokens, container access levels) | Partial (GCS bucket IAM, uniform bucket-level access) |\n| Network exposure | Full (Security Groups, NACLs, port-level analysis) | Partial (NSG rules, inbound port analysis) | Partial (Firewall rules, VPC firewall) |\n| IaC scanning | Full (Terraform, CloudFormation) | Partial (ARM templates, Bicep) | Partial (Deployment Manager) |\n\n---\n\n## Workflows\n\n### Workflow 1: Quick Posture Check (20 Minutes)\n\nFor a newly provisioned resource or pre-deployment review:\n\n```bash\n# 1. Export IAM policy document\naws iam get-policy-version --policy-arn ARN --version-id v1 | \\\n  jq '.PolicyVersion.Document' > policy.json\npython3 scripts\u002Fcloud_posture_check.py policy.json --check iam --json\n\n# 2. Check S3 bucket configuration\naws s3api get-bucket-acl --bucket my-bucket > acl.json\naws s3api get-public-access-block --bucket my-bucket >> bucket.json\npython3 scripts\u002Fcloud_posture_check.py bucket.json --check s3 --json\n\n# 3. Review security groups for open admin ports\naws ec2 describe-security-groups --group-ids sg-123456 | \\\n  jq '.SecurityGroups[0]' > sg.json\npython3 scripts\u002Fcloud_posture_check.py sg.json --check sg --json\n```\n\n**Decision**: Exit code 2 = block deployment and remediate. Exit code 1 = schedule remediation within 24 hours.\n\n### Workflow 2: Full Cloud Security Assessment (Multi-Day)\n\n**Day 1 — IAM and Identity:**\n1. Export all IAM policies attached to production roles\n2. Run cloud_posture_check.py --check iam on each policy\n3. Map all privilege escalation paths found\n4. Identify overprivileged service accounts and roles\n5. Review cross-account trust policies\n\n**Day 2 — Storage and Network:**\n1. Enumerate all S3 buckets and export configurations\n2. Run cloud_posture_check.py --check s3 --severity-modifier regulated-data for data buckets\n3. Export security group configurations for all VPCs\n4. Run cloud_posture_check.py --check sg for internet-facing resources\n5. Review NACL rules for network segmentation gaps\n\n**Day 3 — IaC and Continuous Integration:**\n1. Review Terraform\u002FCloudFormation templates in version control\n2. Check CI\u002FCD pipeline for IaC security gates\n3. Validate findings against `references\u002Fcspm-checks.md`\n4. Produce remediation plan with priority ordering (Critical → High → Medium)\n\n### Workflow 3: CI\u002FCD Security Gate\n\nIntegrate posture checks into deployment pipelines to prevent misconfigured resources reaching production:\n\n```bash\n# Validate IaC before terraform apply\nterraform show -json plan.json | \\\n  jq '[.resource_changes[].change.after | select(. != null)]' > resources.json\npython3 scripts\u002Fcloud_posture_check.py resources.json --check all --json\nif [ $? -eq 2 ]; then\n  echo \"Critical cloud security findings — blocking deployment\"\n  exit 1\nfi\n\n# Validate existing S3 bucket before modifying\naws s3api get-bucket-policy --bucket \"${BUCKET}\" | jq '.Policy | fromjson' | \\\n  python3 scripts\u002Fcloud_posture_check.py - --check s3 \\\n  --severity-modifier regulated-data --json\n```\n\n---\n\n## Anti-Patterns\n\n1. **Running IAM analysis without checking escalation combos** — Individual high-risk actions in isolation may appear low-risk. The danger is in combinations: `iam:PassRole` alone is not critical, but `iam:PassRole + lambda:CreateFunction` is a confirmed privilege escalation path. Always analyze the full statement, not individual actions.\n2. **Enabling only bucket-level public access block** — AWS S3 has both account-level and bucket-level public access block settings. A bucket-level setting can override an account-level setting. Both must be configured. Account-level block alone is insufficient if any bucket has explicit overrides.\n3. **Treating `--severity-modifier internet-facing` as optional for public resources** — Internet-facing resources have significantly higher exposure than internal resources. High findings on internet-facing infrastructure should be treated as critical. Always apply `--severity-modifier internet-facing` for DMZ, load balancer, and API gateway configurations.\n4. **Checking only administrator policies** — Privilege escalation paths frequently originate from non-administrator policies that combine innocuous-looking permissions. All policies attached to production identities must be checked, not just policies with obvious elevated access.\n5. **Remediating findings without root cause analysis** — Removing a dangerous permission without understanding why it was granted will result in re-addition. Document the business justification for every high-risk permission before removing it, to prevent silent re-introduction.\n6. **Ignoring service account over-permissioning** — Service accounts are often over-provisioned during development and never trimmed for production. Every service account in production must be audited against AWS Access Analyzer or equivalent to identify and remove unused permissions.\n7. **Not applying severity modifiers for regulated data workloads** — A high finding in a general-purpose S3 bucket is different from the same finding in a bucket containing PHI or cardholder data. Always use `--severity-modifier regulated-data` when assessing resources in regulated data environments.\n\n---\n\n## Cross-References\n\n| Skill | Relationship |\n|-------|-------------|\n| [incident-response](..\u002Fincident-response\u002FSKILL.md) | Critical findings (public S3, privilege escalation confirmed active) may trigger incident classification |\n| [threat-detection](..\u002Fthreat-detection\u002FSKILL.md) | Cloud posture findings create hunting targets — over-permissioned roles are likely lateral movement destinations |\n| [red-team](..\u002Fred-team\u002FSKILL.md) | Red team exercises specifically test exploitability of cloud misconfigurations found in posture assessment |\n| [security-pen-testing](..\u002Fsecurity-pen-testing\u002FSKILL.md) | Cloud posture findings feed into the infrastructure security section of pen test assessments |\n","# Cloud Security\n\nCloud security posture assessment skill for detecting IAM privilege escalation, public storage exposure, network configuration risks, and infrastructure-as-code misconfigurations. This is NOT incident response for active cloud compromise (see incident-response) or application vulnerability scanning (see security-pen-testing) — this is about systematic cloud configuration analysis to prevent exploitation.\n\n---\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Cloud Posture Check Tool](#cloud-posture-check-tool)\n- [IAM Policy Analysis](#iam-policy-analysis)\n- [S3 Exposure Assessment](#s3-exposure-assessment)\n- [Security Group Analysis](#security-group-analysis)\n- [IaC Security Review](#iac-security-review)\n- [Cloud Provider Coverage Matrix](#cloud-provider-coverage-matrix)\n- [Workflows](#workflows)\n- [Anti-Patterns](#anti-patterns)\n- [Cross-References](#cross-references)\n\n---\n\n## Overview\n\n### What This Skill Does\n\nThis skill provides the methodology and tooling for **cloud security posture management (CSPM)** — systematically checking cloud configurations for misconfigurations that create exploitable attack surface. It covers IAM privilege escalation paths, storage public exposure, network over-permissioning, and infrastructure code security.\n\n### Distinction from Other Security Skills\n\n| Skill | Focus | Approach |\n|-------|-------|----------|\n| **cloud-security** (this) | Cloud configuration risk | Preventive — assess before exploitation |\n| incident-response | Active cloud incidents | Reactive — triage confirmed cloud compromise |\n| threat-detection | Behavioral anomalies | Proactive — hunt for attacker activity in cloud logs |\n| security-pen-testing | Application vulnerabilities | Offensive — actively exploit found weaknesses |\n\n### Prerequisites\n\nRead access to IAM policy documents, S3 bucket configurations, and security group rules in JSON format. For continuous monitoring, integrate with cloud provider APIs (AWS Config, Azure Policy, GCP Security Command Center).\n\n---\n\n## Cloud Posture Check Tool\n\nThe `cloud_posture_check.py` tool runs three types of checks: `iam` (privilege escalation), `s3` (public access), and `sg` (network exposure). It auto-detects the check type from the config file structure or accepts explicit `--check` flags.\n\n```bash\n# Analyze an IAM policy for privilege escalation paths\npython3 scripts\u002Fcloud_posture_check.py policy.json --check iam --json\n\n# Assess S3 bucket configuration for public access\npython3 scripts\u002Fcloud_posture_check.py bucket_config.json --check s3 --json\n\n# Check security group rules for open admin ports\npython3 scripts\u002Fcloud_posture_check.py sg.json --check sg --json\n\n# Run all checks with internet-facing severity bump\npython3 scripts\u002Fcloud_posture_check.py config.json --check all \\\n  --provider aws --severity-modifier internet-facing --json\n\n# Regulated data context (bumps severity by one level for all findings)\npython3 scripts\u002Fcloud_posture_check.py config.json --check all \\\n  --severity-modifier regulated-data --json\n\n# Pipe IAM policy from AWS CLI\naws iam get-policy-version --policy-arn arn:aws:iam::123456789012:policy\u002FMyPolicy \\\n  --version-id v1 | jq '.PolicyVersion.Document' | \\\n  python3 scripts\u002Fcloud_posture_check.py - --check iam --json\n```\n\n### Exit Codes\n\n| Code | Meaning | Required Action |\n|------|---------|-----------------|\n| 0 | No high\u002Fcritical findings | No action required |\n| 1 | High-severity findings | Remediate within 24 hours |\n| 2 | Critical findings | Remediate immediately — escalate to incident-response if active |\n\n---\n\n## IAM Policy Analysis\n\nIAM analysis detects privilege escalation paths, overprivileged grants, public principal exposure, and data exfiltration risk.\n\n### Privilege Escalation Patterns\n\n| Pattern | Severity | Key Action Combination | MITRE |\n|---------|----------|------------------------|-------|\n| Lambda PassRole escalation | Critical | iam:PassRole + lambda:CreateFunction | T1078.004 |\n| EC2 instance profile abuse | Critical | iam:PassRole + ec2:RunInstances | T1078.004 |\n| CloudFormation PassRole | Critical | iam:PassRole + cloudformation:CreateStack | T1078.004 |\n| Self-attach policy escalation | Critical | iam:AttachUserPolicy + sts:GetCallerIdentity | T1484.001 |\n| Inline policy self-escalation | Critical | iam:PutUserPolicy + sts:GetCallerIdentity | T1484.001 |\n| Policy version backdoor | Critical | iam:CreatePolicyVersion + iam:ListPolicies | T1484.001 |\n| Credential harvesting | High | iam:CreateAccessKey + iam:ListUsers | T1098.001 |\n| Group membership escalation | High | iam:AddUserToGroup + iam:ListGroups | T1098 |\n| Password reset attack | High | iam:UpdateLoginProfile + iam:ListUsers | T1098 |\n| Service-level wildcard | High | iam:* or s3:* or ec2:* | T1078.004 |\n\n### IAM Finding Severity Guide\n\n| Finding Type | Condition | Severity |\n|-------------|-----------|----------|\n| Full admin wildcard | Action=* Resource=* | Critical |\n| Public principal | Principal: '*' | Critical |\n| Dangerous action combo | Two-action escalation path | Critical |\n| Individual priv-esc actions | On wildcard resource | High |\n| Data exfiltration actions | s3:GetObject, secretsmanager:GetSecretValue on * | High |\n| Service wildcard | service:* action | High |\n| Data actions on named resource | Appropriate scope | Low\u002FClean |\n\n### Least Privilege Recommendations\n\nFor every critical or high finding, the tool outputs a `least_privilege_suggestion` field with specific remediation guidance:\n- Replace `Action: *` with a named list of required actions\n- Replace `Resource: *` with specific ARN patterns\n- Use AWS Access Analyzer to identify actually-used permissions\n- Separate dangerous action combinations into different roles with distinct trust policies\n\n---\n\n## S3 Exposure Assessment\n\nS3 assessment checks four dimensions: public access block configuration, bucket ACL, bucket policy principal exposure, and default encryption.\n\n### S3 Configuration Check Matrix\n\n| Check | Finding Condition | Severity |\n|-------|------------------|----------|\n| Public access block | Any of four flags missing\u002Ffalse | High |\n| Bucket ACL | public-read-write | Critical |\n| Bucket ACL | public-read or authenticated-read | High |\n| Bucket policy Principal | \"Principal\": \"*\" with Allow | Critical |\n| Default encryption | No ServerSideEncryptionConfiguration | High |\n| Default encryption | Non-standard SSEAlgorithm | Medium |\n| No PublicAccessBlockConfiguration | Status unknown | Medium |\n\n### Recommended S3 Baseline Configuration\n\n```json\n{\n  \"PublicAccessBlockConfiguration\": {\n    \"BlockPublicAcls\": true,\n    \"BlockPublicPolicy\": true,\n    \"IgnorePublicAcls\": true,\n    \"RestrictPublicBuckets\": true\n  },\n  \"ServerSideEncryptionConfiguration\": {\n    \"Rules\": [{\n      \"ApplyServerSideEncryptionByDefault\": {\n        \"SSEAlgorithm\": \"aws:kms\",\n        \"KMSMasterKeyID\": \"arn:aws:kms:region:account:key\u002Fkey-id\"\n      },\n      \"BucketKeyEnabled\": true\n    }]\n  },\n  \"ACL\": \"private\"\n}\n```\n\nAll four public access block settings must be enabled at both the bucket level and the AWS account level. Account-level settings can be overridden by bucket-level settings if not both enforced.\n\n---\n\n## Security Group Analysis\n\nSecurity group analysis flags inbound rules that expose admin ports, database ports, or all traffic to internet CIDRs (0.0.0.0\u002F0, ::\u002F0).\n\n### Critical Port Exposure Rules\n\n| Port | Service | Finding Severity | Remediation |\n|------|---------|-----------------|-------------|\n| 22 | SSH | Critical | Restrict to VPN CIDR or use AWS Systems Manager Session Manager |\n| 3389 | RDP | Critical | Restrict to VPN CIDR or use AWS Fleet Manager |\n| 0–65535 (all) | All traffic | Critical | Remove rule; add specific required ports only |\n\n### High-Risk Database Port Rules\n\n| Port | Service | Finding Severity | Remediation |\n|------|---------|-----------------|-------------|\n| 1433 | MSSQL | High | Allow from application tier SG only — move to private subnet |\n| 3306 | MySQL | High | Allow from application tier SG only — move to private subnet |\n| 5432 | PostgreSQL | High | Allow from application tier SG only — move to private subnet |\n| 27017 | MongoDB | High | Allow from application tier SG only — move to private subnet |\n| 6379 | Redis | High | Allow from application tier SG only — move to private subnet |\n| 9200 | Elasticsearch | High | Allow from application tier SG only — move to private subnet |\n\n### Severity Modifiers\n\nUse `--severity-modifier internet-facing` when the assessed resource is directly internet-accessible (load balancer, API gateway, public EC2). Use `--severity-modifier regulated-data` when the resource handles PCI, HIPAA, or GDPR-regulated data. Both modifiers bump each finding's severity by one level.\n\n---\n\n## IaC Security Review\n\nInfrastructure-as-code review catches configuration issues at definition time, before deployment.\n\n### IaC Check Matrix\n\n| Tool | Check Types | When to Run |\n|------|-------------|-------------|\n| Terraform | Resource-level checks (aws_s3_bucket_acl, aws_security_group, aws_iam_policy_document) | Pre-plan, pre-apply, PR gate |\n| CloudFormation | Template property validation (PublicAccessBlockConfiguration, SecurityGroupIngress) | Template lint, deploy gate |\n| Kubernetes manifests | Container privileges, network policies, secret exposure | PR gate, admission controller |\n| Helm charts | Same as Kubernetes | PR gate |\n\n### Terraform IAM Policy Example — Finding vs. Clean\n\n```hcl\n# BAD: Will generate critical findings\nresource \"aws_iam_policy\" \"bad_policy\" {\n  policy = jsonencode({\n    Version = \"2012-10-17\"\n    Statement = [{\n      Effect   = \"Allow\"\n      Action   = \"*\"\n      Resource = \"*\"\n    }]\n  })\n}\n\n# GOOD: Least privilege\nresource \"aws_iam_policy\" \"good_policy\" {\n  policy = jsonencode({\n    Version = \"2012-10-17\"\n    Statement = [{\n      Effect   = \"Allow\"\n      Action   = [\"s3:GetObject\", \"s3:PutObject\"]\n      Resource = \"arn:aws:s3:::my-specific-bucket\u002F*\"\n    }]\n  })\n}\n```\n\nFull CSPM check reference: `references\u002Fcspm-checks.md`\n\n---\n\n## Cloud Provider Coverage Matrix\n\n| Check Type | AWS | Azure | GCP |\n|-----------|-----|-------|-----|\n| IAM privilege escalation | Full (IAM policies, trust policies, ESCALATION_COMBOS) | Partial (RBAC assignments, service principal risks) | Partial (IAM bindings, workload identity) |\n| Storage public access | Full (S3 bucket policies, ACLs, public access block) | Partial (Blob SAS tokens, container access levels) | Partial (GCS bucket IAM, uniform bucket-level access) |\n| Network exposure | Full (Security Groups, NACLs, port-level analysis) | Partial (NSG rules, inbound port analysis) | Partial (Firewall rules, VPC firewall) |\n| IaC scanning | Full (Terraform, CloudFormation) | Partial (ARM templates, Bicep) | Partial (Deployment Manager) |\n\n---\n\n## Workflows\n\n### Workflow 1: Quick Posture Check (20 Minutes)\n\nFor a newly provisioned resource or pre-deployment review:\n\n```bash\n# 1. Export IAM policy document\naws iam get-policy-version --policy-arn ARN --version-id v1 | \\\n  jq '.PolicyVersion.Document' > policy.json\npython3 scripts\u002Fcloud_posture_check.py policy.json --check iam --json\n\n# 2. Check S3 bucket configuration\naws s3api get-bucket-acl --bucket my-bucket > acl.json\naws s3api get-public-access-block --bucket my-bucket >> bucket.json\npython3 scripts\u002Fcloud_posture_check.py bucket.json --check s3 --json\n\n# 3. Review security groups for open admin ports\naws ec2 describe-security-groups --group-ids sg-123456 | \\\n  jq '.SecurityGroups[0]' > sg.json\npython3 scripts\u002Fcloud_posture_check.py sg.json --check sg --json\n```\n\n**Decision**: Exit code 2 = block deployment and remediate. Exit code 1 = schedule remediation within 24 hours.\n\n### Workflow 2: Full Cloud Security Assessment (Multi-Day)\n\n**Day 1 — IAM and Identity:**\n1. Export all IAM policies attached to production roles\n2. Run cloud_posture_check.py --check iam on each policy\n3. Map all privilege escalation paths found\n4. Identify overprivileged service accounts and roles\n5. Review cross-account trust policies\n\n**Day 2 — Storage and Network:**\n1. Enumerate all S3 buckets and export configurations\n2. Run cloud_posture_check.py --check s3 --severity-modifier regulated-data for data buckets\n3. Export security group configurations for all VPCs\n4. Run cloud_posture_check.py --check sg for internet-facing resources\n5. Review NACL rules for network segmentation gaps\n\n**Day 3 — IaC and Continuous Integration:**\n1. Review Terraform\u002FCloudFormation templates in version control\n2. Check CI\u002FCD pipeline for IaC security gates\n3. Validate findings against `references\u002Fcspm-checks.md`\n4. Produce remediation plan with priority ordering (Critical → High → Medium)\n\n### Workflow 3: CI\u002FCD Security Gate\n\nIntegrate posture checks into deployment pipelines to prevent misconfigured resources reaching production:\n\n```bash\n# Validate IaC before terraform apply\nterraform show -json plan.json | \\\n  jq '[.resource_changes[].change.after | select(. != null)]' > resources.json\npython3 scripts\u002Fcloud_posture_check.py resources.json --check all --json\nif [ $? -eq 2 ]; then\n  echo \"Critical cloud security findings — blocking deployment\"\n  exit 1\nfi\n\n# Validate existing S3 bucket before modifying\naws s3api get-bucket-policy --bucket \"${BUCKET}\" | jq '.Policy | fromjson' | \\\n  python3 scripts\u002Fcloud_posture_check.py - --check s3 \\\n  --severity-modifier regulated-data --json\n```\n\n---\n\n## Anti-Patterns\n\n1. **Running IAM analysis without checking escalation combos** — Individual high-risk actions in isolation may appear low-risk. The danger is in combinations: `iam:PassRole` alone is not critical, but `iam:PassRole + lambda:CreateFunction` is a confirmed privilege escalation path. Always analyze the full statement, not individual actions.\n2. **Enabling only bucket-level public access block** — AWS S3 has both account-level and bucket-level public access block settings. A bucket-level setting can override an account-level setting. Both must be configured. Account-level block alone is insufficient if any bucket has explicit overrides.\n3. **Treating `--severity-modifier internet-facing` as optional for public resources** — Internet-facing resources have significantly higher exposure than internal resources. High findings on internet-facing infrastructure should be treated as critical. Always apply `--severity-modifier internet-facing` for DMZ, load balancer, and API gateway configurations.\n4. **Checking only administrator policies** — Privilege escalation paths frequently originate from non-administrator policies that combine innocuous-looking permissions. All policies attached to production identities must be checked, not just policies with obvious elevated access.\n5. **Remediating findings without root cause analysis** — Removing a dangerous permission without understanding why it was granted will result in re-addition. Document the business justification for every high-risk permission before removing it, to prevent silent re-introduction.\n6. **Ignoring service account over-permissioning** — Service accounts are often over-provisioned during development and never trimmed for production. Every service account in production must be audited against AWS Access Analyzer or equivalent to identify and remove unused permissions.\n7. **Not applying severity modifiers for regulated data workloads** — A high finding in a general-purpose S3 bucket is different from the same finding in a bucket containing PHI or cardholder data. Always use `--severity-modifier regulated-data` when assessing resources in regulated data environments.\n\n---\n\n## Cross-References\n\n| Skill | Relationship |\n|-------|-------------|\n| [incident-response](..\u002Fincident-response\u002FSKILL.md) | Critical findings (public S3, privilege escalation confirmed active) may trigger incident classification |\n| [threat-detection](..\u002Fthreat-detection\u002FSKILL.md) | Cloud posture findings create hunting targets — over-permissioned roles are likely lateral movement destinations |\n| [red-team](..\u002Fred-team\u002FSKILL.md) | Red team exercises specifically test exploitability of cloud misconfigurations found in posture assessment |\n| [security-pen-testing](..\u002Fsecurity-pen-testing\u002FSKILL.md) | Cloud posture findings feed into the infrastructure security section of pen test assessments |\n",{"name":5,"description":7},"devin\u002F1780503568-install-devin-skills","c1c6a7ac191f1fb795ae7f57f2fbfa600d3ef56b",".devin\u002Fskills\u002Fcloud-security",0,"https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin","https:\u002F\u002Fgithub.com\u002Fkruxshnx","https:\u002F\u002Fgovinda-krishna.vercel.app\u002F","2026-06-04 00:21:41",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add kruxshnx\u002Fclaude-skills-devin --skill cloud-security",{"tool":38,"command":39},"bunx","bunx skills add kruxshnx\u002Fclaude-skills-devin --skill cloud-security",{"tool":41,"command":42},"pnpm","pnpm dlx skills add kruxshnx\u002Fclaude-skills-devin --skill cloud-security","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002F.devin\u002Fskills\u002Fcloud-security\u002FSKILL.md",true,[46,52],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fcspm-checks.md","REFERENCE","参考文档",8938,"https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002F.devin\u002Fskills\u002Fcloud-security\u002Freferences\u002Fcspm-checks.md",{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"scripts\u002Fcloud_posture_check.py","SCRIPT","脚本",43091,"https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002F.devin\u002Fskills\u002Fcloud-security\u002Fscripts\u002Fcloud_posture_check.py",[59,67,74,81,88,95],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":66},"01M779G0P3W78CJF700K9AHJ6M","syllabus","Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Triggers whenever a user uploads a syllabus, course outline, or curriculum document and wants supplementary readings. Also triggers on: 'syllabus reading list', 'find papers for my course', 'create a reading list from this syllabus', 'recent research for my class', 'supplementary readings', 'find journal articles for these topics', 'what recent papers cover this material', 'any new research on these course topics', 'update my syllabus with recent papers'. Even casual mentions when a syllabus is attached should trigger this skill.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Fsyllabus\u002Fskills\u002Fsyllabus\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":66},"01M779FBBF54JKVQAGBAYHWE0B","research","Default entry point for any research request — a hybrid router that classifies the question deterministically and either delegates to a specialist research skill (pulse for trends\u002Fsentiment, grants for NIH funding, litreview for academic literature, syllabus for course reading, patent for prior-art + IP landscape, dossier for entity research) or runs its own plan-decompose-multi-source-search-synthesize-cite fallback workflow when no specialist matches. Always surfaces the routing decision so users can override. Triggers — \"research [topic]\", \"look into [topic]\", \"what do we know about [topic]\", \"investigate [topic]\", \"find me information on [topic]\", \"do some research on [topic]\", \"I need to understand [topic]\", or any research request that doesn't obviously match a more-specific specialist skill. Output is a markdown briefing (default) or .docx document (on request) with full citations and an audit log.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Fresearch\u002Fskills\u002Fresearch\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":66},"01M779EQ39CGK5Q4V78KC0HNMV","pulse","Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X\u002FTwitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend\u002Fsentiment\u002Fproblems\u002Fopportunities\u002Fcomparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Triggers: 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]', or any variation requesting multi-source recency intelligence on a topic. Also use for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Fpulse\u002Fskills\u002Fpulse\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":66},"01M779EDS05MYFXBF7PGTVSDMA","patent","Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search \u002F freedom-to-operate \u002F competitive landscape \u002F acquisition diligence \u002F litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Triggers: 'prior art search for [invention]', 'patent search on [topic]', 'freedom to operate analysis', 'FTO for [product]', 'patent landscape for [field]', 'is [invention] novel', 'patents on [topic]', 'competitive patent analysis', 'prior art for litigation', 'patent diligence on [company]'. Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Fpatent\u002Fskills\u002Fpatent\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":66},"01M779DVA52T5F0YC5HSM9BW4Z","notebooklm","Browser automation skill for controlling Google's NotebookLM. Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio Overview, infographics, slide decks, study guides, briefing docs, mind maps, timelines, FAQs), and creating new notebooks. Triggers on any phrase involving NotebookLM — 'open NotebookLM', 'check my [name] notebook', 'pull info from NotebookLM', 'ask my notebook about X', 'add [source] to NotebookLM', 'create an infographic in NotebookLM', 'use NotebookLM Studio', 'generate a slide deck from my notebook', or any variation where the goal involves NotebookLM. Requires browser automation environment — fails gracefully when unavailable.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Fnotebooklm\u002Fskills\u002Fnotebooklm\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":66},"01M779D3SGW8FM1N8G0HK860WT","litreview","Academic literature orientation skill that searches papers via Consensus, builds a strategic search plan using PICO (default) or SPIDER \u002F Decomposition \u002F hybrid as fallbacks, and synthesizes findings into a professionally formatted Word document (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5\u002F10\u002F20 queries) controls coverage vs. speed. Output is a 'launching pad' — not a finished review, but an orientation guide that lets a researcher dive in confidently. Triggers: 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'. Do NOT trigger for single one-off paper searches where the user just wants a quick list — that's a plain Consensus search.","https:\u002F\u002Fgithub.com\u002Fkruxshnx\u002Fclaude-skills-devin\u002Fblob\u002Fdevin\u002F1780503568-install-devin-skills\u002Fresearch\u002Flitreview\u002Fskills\u002Flitreview\u002FSKILL.md",[],[]]