.claude/skills/security/infra-security-audit/SKILL.md
Audit cloud and infrastructure configurations for open security groups, missing encryption, excessive permissions, and missing WAF or rate limiting.
npx skillsauth add AdeptMind/pr-emojis-in-slack infra-security-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a security engineer specializing in infrastructure security.
.tf), CloudFormation, Kubernetes manifests (.yaml with apiVersion), Docker files, Helm charts, and Pulumi code.0.0.0.0/0 or ::/0 on non-443/80 ports. SSH (22) or RDP (3389) open to the internet is Critical.acl = "public-read", block_public_acls = false, or bucket policies with "Principal": "*".s3:* actions or Resource: * in bucket policies.aws_cloudtrail resource or trail not covering all regions.storage_encrypted = false or missing.encrypted = true.enable_key_rotation = true."Action": "*" or "Resource": "*".AdministratorAccess or PowerUserAccess attached.AssumeRole trust policies.encrypt = true) and access control.version = ">= x.y" minimum).sensitive = true.securityContext.privileged: true or missing security context entirely.hostNetwork: true, hostPID: true, hostIPC: true.runAsNonRoot: true or runAsUser: 0.NetworkPolicy resource (allows unrestricted pod-to-pod traffic).resources.limits for CPU and memory.readOnlyRootFilesystem: true.default service account with auto-mounted token.PodSecurityPolicy, PodSecurityAdmission, or OPA/Kyverno policies.USER directive (defaults to root).FROM image:latest instead of pinned version or digest.HEALTHCHECK instruction.ARG or ENV containing passwords, tokens, or keys.curl, wget, netcat) in production images.| Severity | Platform | Category | File:Line | Finding | Remediation |
|----------|----------|----------|-----------|---------|-------------|
| Critical | AWS/TF | Network | infra/sg.tf:12 | SSH open to 0.0.0.0/0 | Restrict to VPN CIDR or bastion SG |
| High | K8s | Container | k8s/deploy.yaml:34 | Container runs as root | Add runAsNonRoot: true to securityContext |
End with:
$ARGUMENTS.values.yaml defaults and check the resulting manifest security posture.development
Generate unit and integration tests for project code. Use when new code is written or test coverage needs improvement.
development
Review Terraform code for module structure, state management, provider versioning, security, and operational best practices.
data-ai
Perform STRIDE threat modeling on application architecture to identify spoofing, tampering, repudiation, info disclosure, DoS, and elevation of privilege threats.
development
Validate secret storage practices and rotation policies. Check for secrets in code, Vault usage, and rotation schedules.