container-security
Skill6 starsChanged 8 months agoMITView on GitHub
Dockerfile best practices, secure base images, no secrets in build context, multi-stage builds, non-root execution, and image scanning guidance.
- Reads credentials
7 other projects use a version of this.
Adopted by
Most recently taken up by
- EvilFreelancer/secstheir own version, first seen Aug 8, 2026
- kyleoliveiro/sg-gov-skillstheir own version, first seen Jul 23, 2026
- ShieldNet-360/secure-vibetheir own version, first seen Jul 9, 2026
- hardw00t/ai-security-arsenaltheir own version, first seen Apr 19, 2026
- UnitOneAI/SecuritySkillstheir own version, first seen Mar 31, 2026
- vbrevik/claude_code_skillstheir own version, first seen Mar 14, 2026
Used with
Projects with it also use iac-security and api-security.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
UnitOneAISkilliac-security
Performs a security review of Infrastructure as Code templates against the OWASP IaC Security Cheat Sheet, SLSA v1.0, and CIS Benchmarks. Auto-invoked when reviewing Terraform, CloudFormation, or Pulumi configurations. Detects hardcoded secrets, public exposure patterns, encryption gaps, overly permissive IAM, and misconfigurations equivalent to Checkov, tfsec, and KICS rules. Produces a structured findings report with remediation guidance.
Also in 4 projects that use this
jefflesterSkillapi-security
API security best practices and common vulnerability prevention. Enforces security checks for authentication, input validation, SQL injection, XSS, and OWASP Top 10 vulnerabilities. Use when building or modifying APIs.
Also in 3 projects that use this
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- hardw00t/ai-security-arsenal★ 104same name
- UnitOneAI/SecuritySkills★ 78same name
- ShieldNet-360/secure-vibe★ 22same name
- kyleoliveiro/sg-gov-skills★ 16same name
- EvilFreelancer/secs★ 11same name
- medy-gribkov/arcana★ 1same name
- vbrevik/claude_code_skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository64 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- api-backward-compatibilitySkill
- api-design-standardsSkill
- api-versioningSkill
- database-designSkill
- distributed-systemsSkill
- observability-by-defaultSkill
- performance-budgetsSkill
- resilience-patternsSkill
- twelve-factor-appSkill
- codex-cross-reviewSkill
- dispatching-parallel-agentsSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- subagent-driven-developmentSkill
- architecture-awarenessSkill
- intent-to-specSkill
- project-diagnosisSkill
- using-shipworthySkill
- systematic-debuggingSkill
- documentation-as-codeSkill
- accessibilitySkill
- frontend-standardsSkill
- retrospectiveSkill
- writing-skillsSkill
- ci-cd-awarenessSkill
- context-managerSkill
- environment-setupSkill
- feature-flag-disciplineSkill
- finishing-a-development-branchSkill
- guardrail-audit-logSkill
- incident-responseSkill
- mcp-integrationSkill
- migration-strategiesSkill
- production-readinessSkill
- scope-creep-detectionSkill
- session-memorySkill
- slo-sli-definitionSkill
- tech-debt-trackingSkill
- using-git-worktreesSkill
- zero-downtime-migrationsSkill
- brainstormingSkill
- decision-frameworksSkill
- design-documentsSkill
- executing-plansSkill
- writing-plansSkill
- code-complexitySkill
- confidence-based-strictnessSkill
- error-handling-patternsSkill
- feedback-driven-adaptationSkill
- quality-gatesSkill
- response-schema-validationSkill
- test-driven-developmentSkill
- verification-before-completionSkill
- adaptive-securitySkill
- bias-detectionSkill
- compliance-awarenessSkill
- dependency-managementSkill
- pii-detectionSkill
- secrets-managementSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 40
Keep build tools out of the final image:
- Very specific: line 60
Always run as a non-root user.
- Very specific: line 69
Every project with a Dockerfile must have a .dockerignore:
- Distinctive: line 85
Policy: No CRITICAL vulnerabilities in production images.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Container Security
Base Image Rules
- Use official or verified images only --
node:22-slim,python:3.12-slim,alpine:3.20. - Pin by digest, not just tag -- tags are mutable.
- Prefer
-slimor-alpinevariants -- smaller attack surface. - Never use
latest-- builds must be reproducible.
# BAD
FROM node:latest
# GOOD -- pinned tag + slim variant
FROM node:22.12-slimNo Secrets in the Dockerfile
Secrets in the build context end up in image layers. Layers are permanent and extractable.
# BAD -- secret baked into the image
ENV DATABASE_URL=postgres://user:password@host/db
COPY .env /app/.env
# GOOD -- inject at runtime via docker run -e or --env-file
# For build-time secrets, use BuildKit secret mounts:
RUN --mount=type=secret,id=npmrc,target=/root/.npmrc npm ciMulti-Stage Builds
Keep build tools out of the final image:
FROM node:22.12-slim AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:22.12-slim
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
USER node
CMD ["node", "dist/server.js"]Non-Root User
Always run as a non-root user. Most official images ship one (e.g., node).
RUN addgroup --system app && adduser --system --ingroup app app
USER app.dockerignore Is Required
Every project with a Dockerfile must have a .dockerignore:
.git
.env*
node_modules
*.md
.github
tests
coverageImage Scanning
Scan images in CI before pushing to a registry. Tools: Trivy (free, fast), Snyk Container, Docker Scout.
Policy: No CRITICAL vulnerabilities in production images. HIGH must be triaged within 7 days.
- name: Scan image
uses: aquasecurity/trivy-action@master
with:
image-ref: myapp:${{ github.sha }}
severity: CRITICAL,HIGH
exit-code: 1Dockerfile Review Checklist
- Base image is official/verified, pinned to a specific version
- No
ENVorCOPYof secrets -- runtime injection only - Multi-stage build separates build tools from production image
- Final stage runs as non-root user
.dockerignoreexists and excludes.env*,.git,node_modules- Image is scanned in CI with a fail-on-critical policy
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

