security-docker

Audit Dockerfiles and docker-compose.yml files for secrets, exposure, and misconfigurations.

7|2|Updated Jan 18, 2026
One-click install
npx skills add https://github.com/justinlevinedotme/jalco-opencode --skill security-docker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-docker
Source: https://github.com/justinlevinedotme/jalco-opencode/tree/main/opencode/.config/opencode/skills/security-docker
Command: npx skills add https://github.com/justinlevinedotme/jalco-opencode --skill security-docker

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ripgrep, and includes scripts (resource) components.

What problem does it solve?

Audit Docker and container deployments for secrets, exposure, and misconfigurations.

Core Features & Use Cases

  • Secrets scanning: detect secrets in ENV/ARG and image history.
  • Exposure and privilege checks: flag open ports, docker.sock mounts, privileged containers, and host network usage.
  • Non-root and build best-practices: ensure non-root users, multi-stage builds, and proper .dockerignore usage.
  • Use Case: For a project with a Dockerfile and docker-compose.yml, scan for secrets, privileged containers, and exposed resources, then remediate.

Quick Start

Run the Docker security scan on your project to identify secrets, exposed ports, and risky configurations.

Frequently Asked Questions about security-docker

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan a Dockerfile for hardcoded secrets and misconfigurations?

To scan a Dockerfile for hardcoded secrets and misconfigurations, run an automated audit that checks ENV/ARG variables, image history, and build contexts. This process detects exposed secrets and flags risky deployment settings across your environments.

What Docker security risks should I check for in docker-compose.yml?

Key Docker security risks in docker-compose.yml include privileged containers, docker.sock mounts, host network usage, and open ports. Auditing these configurations prevents unauthorized host access and limits exposure across staging and production workflows.

How do I know if my Docker container is running with root privileges?

To determine if your Docker container is running with root privileges, perform a security audit that checks for non-root user enforcement. The audit identifies containers lacking user downgrades and flags them as risky misconfigurations.

Does a Docker security audit check for missing .dockerignore exclusions?

Yes, a Docker security audit checks for missing .dockerignore exclusions to prevent sensitive files from entering the build context. Scanning for proper .dockerignore usage ensures secrets and unnecessary files are excluded from your images.

Can I use ripgrep to detect secrets in Docker build history?

Yes, you can use ripgrep to detect secrets in Docker build history by searching ENV/ARG instructions and layered metadata. This dependency enables fast, recursive scanning of Dockerfiles and compose files for exposed credentials.

Why should I use multi-stage builds for Docker security?

You should use multi-stage builds for Docker security to reduce attack surfaces and eliminate build-time secrets from final images. Security audits enforce multi-stage build best-practices to ensure only necessary artifacts remain in production containers.