docker-hardening
Skill1 starsChanged 33 days agoMITView on GitHub
Harden Dockerfiles, images and container runtime settings — minimal base images, non-root users, pinned digests, capabilities and secrets handling. Use when writing or reviewing a Dockerfile or Compose file, or before deploying containers.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ferr079/claude-code-cybersec-skillstheir own version, first seen Oct 12, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- ferr079/claude-code-cybersec-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 repository105 other files it gives its agents.
- AGENTS.mdAGENTS.md
- instructions/AGENTS.mdAGENTS.md
- accessibility-reviewSkill
- agent-evaluationSkill
- agent-guardrailsSkill
- agenthub-routerSkill
- ai-red-teamingSkill
- ansible-reviewSkill
- api-designSkill
- api-integrationSkill
- architecture-decisionSkill
- backup-restoreSkill
- caching-strategySkill
- chaos-engineeringSkill
- ci-cd-pipeline-designSkill
- cloud-cost-optimizationSkill
- cloud-iam-least-privilegeSkill
- code-reviewSkill
- container-image-optimizationSkill
- cyber-resilience-actSkill
- database-migrationsSkill
- data-pipeline-reviewSkill
- data-privacySkill
- data-quality-checksSkill
- debugging-root-causeSkill
- dependency-auditSkill
- dependency-upgradeSkill
- disaster-recovery-drillSkill
- documentationSkill
- dora-readinessSkill
- dpiaSkill
- email-deliverabilitySkill
- embedding-model-selectionSkill
- error-handling-reviewSkill
- eu-ai-act-readinessSkill
- eu-data-sovereigntySkill
- european-accessibility-actSkill
- event-driven-architectureSkill
- feature-flagsSkill
- frontend-reviewSkill
- gdpr-dsar-handlingSkill
- github-actionsSkill
- gitlab-ciSkill
- git-workflowSkill
- go-developmentSkill
- graphql-api-reviewSkill
- helm-chart-reviewSkill
- i18n-localizationSkill
- incident-responseSkill
- java-spring-reviewSkill
- kubernetes-reviewSkill
- linux-server-hardeningSkill
- llm-cost-analysisSkill
- llm-gateway-routingSkill
- llm-observabilitySkill
- llm-output-evaluationSkill
- llm-structured-extractionSkill
- load-testingSkill
- local-llm-servingSkill
- log-analysisSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Check runtime user with docker image inspect IMAGE --format '{{json .Config.User}}'.
- Distinctive: line 19
Run vulnerability and SBOM tooling appropriate to the environment.
- Distinctive: line 20
Test startup, health, graceful shutdown, upgrade and rollback in a disposable environment.
- Distinctive: line 40
No privileged mode, host PID/network or Docker socket mounts without documented exception.
- Distinctive: line 41
Only required ports and mounts are exposed.
- Distinctive: line 48
Test hardening changes in a disposable environment first.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Docker Hardening
Goal
Reduce container attack surface without breaking application behavior.
Review checklist
- Identify base image and pin a specific release or digest; document update cadence.
- Check runtime user with
docker image inspect IMAGE --format '{{json .Config.User}}'. Prefer non-root where supported. - Inspect mounts, published ports, environment variables, network connectivity and writable directories.
- Review Linux capabilities; drop unnecessary capabilities, disallow privilege escalation and use a read-only root filesystem when feasible.
- Configure memory/CPU limits, health checks, restart policy and log rotation.
- Move secrets out of Dockerfiles and image layers; use approved secret delivery.
- Run vulnerability and SBOM tooling appropriate to the environment; record versions and findings.
- Test startup, health, graceful shutdown, upgrade and rollback in a disposable environment.
Example Compose baseline
services:
app:
image: example/app:1.2.3 # replace with verified digest for production
user: "10001:10001"
read_only: true
cap_drop: [ALL]
security_opt: ["no-new-privileges:true"]
tmpfs: ["/tmp:rw,noexec,nosuid,size=64m"]
pids_limit: 256
mem_limit: 512m
restart: unless-stoppedThis is an illustrative baseline; adjust writable paths, UID and probes to the actual image.
Acceptance checks
- Application works under the intended non-root identity.
- No privileged mode, host PID/network or Docker socket mounts without documented exception.
- Only required ports and mounts are exposed.
- Rollback and data persistence are tested.
Output
Risk-ranked findings, evidence, recommended changes and test results.
Safety
Test hardening changes in a disposable environment first; dropping capabilities, read-only file systems or user changes can stop services. Never bake secrets into images, and do not pull or run unverified images on production hosts. Production restarts and redeploys require approval.
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.

