Skip to main content
Wright Websites

dockerfile-sentinel

lint Dockerfiles for risk

Dockerfile and Docker Compose security linter: root users, unpinned or EOL base images, hardcoded secrets, curl | sh, disabled TLS/GPG checks, sensitive COPY, missing .dockerignore, privileged.

  • 22/week on npm
  • 2★
  • MIT
  • v1.1.0
  • Supply Chain
npx dockerfile-sentinel

Read the full README on GitHub (opens in a new tab)View on npm (opens in a new tab)

dockerfile-sentinel

From the README

dockerfile-sentinel reads Dockerfiles, Containerfiles and Compose files and reports security problems with a line number and a fix. CLI, library and GitHub Action. Node.js 18+, one runtime dependency (bundle-secret-guard, for its shared credential patterns). Nothing is built or pulled; files are only parsed. Secrets are masked in every output.

npx dockerfile-sentinel                      # scan the current directory
npx dockerfile-sentinel Dockerfile docker-compose.yml --fail-on medium
npx dockerfile-sentinel services/ --format sarif > docker.sarif

Related packages

Supply Chain