Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
pluginagentmarketplace avatar

Docker Security

  • 31 installs
  • 2 repo stars
  • Updated January 5, 2026
  • pluginagentmarketplace/custom-plugin-docker

Run structured Docker and container security checks with configurable strictness before you ship images or merge infra changes.

About

docker-security is a marketplace plugin skill aimed at solo builders and small teams who containerize services and want agent-guided security validation instead of ad-hoc Dockerfile reviews. The packaged configuration defines how validation runs: whether strict mode is on, whether the agent may auto-fix findings, and how results are formatted for downstream review. Development defaults keep logging verbose and rules relaxed so you can iterate; production profile tightens strict_mode and reduces log noise to warnings. Integrations with git, linters, and formatters position the skill inside your normal ship pipeline rather than as a one-off chat prompt. Use it when you are preparing images for registry push, tightening compose files, or aligning container settings with a repeatable security checklist the agent can apply consistently across repos.

  • JSON Schema–backed skill config with semver versioning and security category enum
  • Validation block with strict_mode and auto_fix toggles for dev vs production
  • Markdown output format with optional examples for agent-readable reports
  • Integration hooks for git, linter, and formatter workflows
  • Environment overrides separating debug logging in development from warn-level production checks

Docker Security by the numbers

  • 31 all-time installs (skills.sh)
  • +1 installs in the week ending Jul 26, 2026 (Skillselion tracking)
  • Ranked #1,482 of 2,209 Security skills by installs in the Skillselion catalog
  • Security screen: HIGH risk (skills.sh audit)
  • Data as of Jul 26, 2026 (Skillselion catalog sync)
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-docker --skill docker-security

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs31
repo stars2
Security audit2 / 3 scanners passed
Last updatedJanuary 5, 2026
Repositorypluginagentmarketplace/custom-plugin-docker

What it does

Run structured Docker and container security checks with configurable strictness before you ship images or merge infra changes.

Files

SKILL.mdMarkdownGitHub ↗

Docker Security Skill

Master container security hardening, vulnerability scanning, and secrets management following CIS Docker Benchmark.

Purpose

Implement security best practices for Docker containers and images including non-root users, capability dropping, and vulnerability scanning.

Parameters

ParameterTypeRequiredDefaultDescription
imagestringNo-Image to scan
severityenumNoHIGHCRITICAL/HIGH/MEDIUM/LOW
compliancestringNoCISCIS/NIST/SOC2

Security Hardening

Non-Root User (MANDATORY)

# Create non-root user
RUN addgroup -g 1001 app && \
    adduser -u 1001 -G app -D app

# Set ownership
COPY --chown=app:app . /app

# Switch user
USER app

Read-Only Filesystem

docker run --read-only \
  --tmpfs /tmp:rw,noexec,nosuid \
  myapp:latest

Drop Capabilities

docker run \
  --cap-drop ALL \
  --cap-add NET_BIND_SERVICE \
  myapp:latest

Complete Hardened Run

docker run \
  --security-opt no-new-privileges:true \
  --cap-drop ALL \
  --read-only \
  --user 1001:1001 \
  --pids-limit 100 \
  --memory 512m \
  myapp:latest

Vulnerability Scanning

Trivy

# Basic scan
trivy image myapp:latest

# Filter by severity
trivy image --severity CRITICAL,HIGH myapp:latest

# CI/CD integration (fail on critical)
trivy image --exit-code 1 --severity CRITICAL myapp:latest

# JSON output
trivy image --format json --output report.json myapp:latest

Docker Scout

# Quick scan
docker scout cves myapp:latest

# Detailed report
docker scout cves --format markdown myapp:latest

Secrets Management

Docker Compose Secrets

services:
  database:
    image: postgres:16-alpine
    secrets:
      - db_password
    environment:
      POSTGRES_PASSWORD_FILE: /run/secrets/db_password

secrets:
  db_password:
    file: ./secrets/db_password.txt

BuildKit Secrets

# syntax=docker/dockerfile:1
RUN --mount=type=secret,id=npmrc,target=/root/.npmrc \
    npm install
docker build --secret id=npmrc,src=.npmrc .

Secure Dockerfile

FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build

FROM gcr.io/distroless/nodejs20-debian12
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
USER nonroot
CMD ["dist/index.js"]

Error Handling

Common Errors

ErrorCauseSolution
permission deniedNon-root userFix file ownership
read-only filesystemRead-only modeUse tmpfs mounts
operation not permittedMissing capabilityAdd specific cap

Fallback Strategy

1. Start without restrictions 2. Add security options incrementally 3. Test each restriction

Troubleshooting

Debug Checklist

  • [ ] Running as non-root? docker exec <c> id
  • [ ] Scanned for vulnerabilities?
  • [ ] Capabilities dropped?
  • [ ] Secrets not in env vars?

CIS Benchmark

docker run --rm --net host --pid host \
  -v /var/run/docker.sock:/var/run/docker.sock \
  docker/docker-bench-security

Usage

Skill("docker-security")

Related Skills

  • dockerfile-basics
  • docker-production

Related skills

FAQ

Is Docker Security safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Securityappseccompliancesecrets

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.