Skip to content
Back to skills

Iac Antipatterns

ASecurity

Forbidden IaC/container/CI patterns — public cloud resources, unencrypted storage, privileged containers, unpinned images, insecure CI workflows.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 21, 2026
ai-agentsshelldockerkubernetesawsgitdatabase

Security analysis

A100/100

Pro scans all 19 files and shows the line behind each finding

Scanned October 21, 2026

npx -y skills add emgiezet/aisdlc --skill iac-antipatterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Iac Antipatterns?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Iac Antipatterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/emgiezet-iac-antipatterns/badge)](https://www.skillsdirectory.com/skills/emgiezet-iac-antipatterns)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: iac-antipatterns
description: Forbidden IaC/container/CI patterns — public cloud resources, unencrypted storage, privileged containers, unpinned images, insecure CI workflows.
paths: ["**/*.dockerfile","**/*.tf","**/*.tfvars","**/*.yaml","**/*.yml","**/Dockerfile",".github/workflows/**/*.yaml",".github/workflows/**/*.yml",".gitlab-ci.yml","charts/**","templates/**/*.yaml"]
user-invocable: false
---

# IaC / containers / CI anti-patterns — do not write these

Checks run automatically after each edit. Findings reference the IDs below.

## Blockers
- AP-TF-001 — Attach `aws_s3_bucket_public_access_block` with all four block flags set to `true`.
- AP-TF-002 — Never allow `0.0.0.0/0` inbound on admin/database ports; restrict to specific CIDRs.
- AP-TF-003 — Enable server-side encryption on every EBS, RDS, and S3 resource.
- AP-TF-004 — List specific IAM actions and resource ARNs; never use `Action: *` or `Resource: *`.
- AP-TF-005 — Use `sensitive = true` on secret outputs; load credentials from env vars or secrets manager.
- AP-K8S-001 — Set `privileged: false`, `allowPrivilegeEscalation: false`, and `runAsNonRoot: true`.
- AP-K8S-005 — Reference `secretKeyRef` from a Kubernetes Secret; never hard-code secrets in env or ConfigMap.
- AP-DOCKER-003 — Never put secrets in ENV/ARG/COPY; inject at runtime via env vars or use BuildKit secrets.
- AP-DOCKER-004 — Never pipe download to shell in RUN; add `set -o pipefail` before any pipe in RUN.
- AP-CI-001 — Pin every `uses:` to the full commit SHA (e.g. `actions/checkout@abc123...`).
- AP-CI-002 — Never check out PR code inside a `pull_request_target` workflow; use `pull_request` instead.
- AP-CI-003 — Pass event data via `env:` variables in run steps; never interpolate `${{ }}` into `run:`.

## Errors
- AP-TF-006 — Pin every provider and module to an exact version constraint in `required_providers`.
- AP-K8S-002 — Define `resources.requests` and `resources.limits` for every container.
- AP-K8S-003 — Pin container images to an explicit version tag or an immutable digest.
- AP-DOCKER-001 — Pin base images to a specific digest; never use `:latest` in production.
- AP-DOCKER-002 — Create a non-root user in the Dockerfile and end with `USER nonroot` before CMD.
- AP-CI-004 — Declare `permissions:` at the top level and restrict each job to the minimum needed.
- AP-CI-006 — Pin GitLab CI images to digests; use `include: { integrity: }` for remote includes.

## Warnings
- AP-DOCKER-005 — Use multi-stage builds; copy only the compiled artifact into the final minimal image.

Details for any ID: `reference/<ID>.md`

Files in this skill

  • SKILL.md2.6 KB
  • reference/AP-CI-001.md604 B
  • reference/AP-CI-002.md775 B
  • reference/AP-CI-003.md639 B
  • reference/AP-CI-004.md670 B
  • reference/AP-CI-005.md705 B
  • reference/AP-CI-006.md806 B
  • reference/AP-DOCKER-001.md560 B
  • reference/AP-DOCKER-002.md666 B
  • reference/AP-DOCKER-003.md796 B
  • reference/AP-DOCKER-004.md811 B
  • reference/AP-DOCKER-005.md794 B
  • reference/AP-K8S-001.md739 B
  • reference/AP-K8S-002.md710 B
  • reference/AP-K8S-003.md553 B
  • reference/AP-K8S-004.md741 B
  • reference/AP-K8S-005.md702 B
  • reference/AP-K8S-006.md852 B
  • reference/AP-TF-001.md729 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.