container-hadolint

Solid

Dockerfile security linting and best practice validation using Hadolint with 100+ built-in rules aligned to CIS Docker Benchmark. Use when: (1) Analyzing Dockerfiles for security misconfigurations and anti-patterns, (2) Enforcing container image security best practices in CI/CD pipelines, (3) Detecting hardcoded secrets and credentials in container builds, (4) Validating compliance with CIS Docker Benchmark requirements, (5) Integrating shift-left container security into developer workflows, (6) Providing remediation guidance for insecure Dockerfile instructions.

DevOps & Infrastructure 335 stars 29 forks Updated today

Install

View on GitHub

Quality Score: 85/100

Stars 20%
84
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
0
Description 5%
100

Skill Content

# Dockerfile Security Linting with Hadolint ## Overview Hadolint is a Dockerfile linter that validates container build files against security best practices and the CIS Docker Benchmark. It analyzes Dockerfile instructions to identify misconfigurations, anti-patterns, and security vulnerabilities before images are built and deployed. Hadolint integrates ShellCheck to validate RUN instructions, ensuring shell commands follow security best practices. With 100+ built-in rules mapped to CIS Docker Benchmark controls, Hadolint provides comprehensive security validation for container images. ## Quick Start ### Install Hadolint ```bash # macOS via Homebrew brew install hadolint # Linux via binary wget -O /usr/local/bin/hadolint https://github.com/hadolint/hadolint/releases/latest/download/hadolint-Linux-x86_64 chmod +x /usr/local/bin/hadolint # Via Docker docker pull hadolint/hadolint ``` ### Scan Dockerfile ```bash # Scan Dockerfile in current directory hadolint Dockerfile # Scan with specific Dockerfile path hadolint path/to/Dockerfile # Using Docker docker run --rm -i hadolint/hadolint < Dockerfile ``` ### Generate Report ```bash # JSON output for automation hadolint -f json Dockerfile > hadolint-report.json # GitLab Code Quality format hadolint -f gitlab_codeclimate Dockerfile > hadolint-codeclimate.json # Checkstyle format for CI integration hadolint -f checkstyle Dockerfile > hadolint-checkstyle.xml ``` ## Core Workflows ### 1. Local Development Scanning Val...

Details

Author
aiskillstore
Repository
aiskillstore/marketplace
Created
5 months ago
Last Updated
today
Language
Python
License
None

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

DevOps & Infrastructure Featured

hardening-docker-containers-for-production

Hardening Docker containers for production involves applying security best practices aligned with CIS Docker Benchmark v1.8.0 to minimize attack surface, prevent privilege escalation, and enforce leas

13,115 Updated today
mukul975
DevOps & Infrastructure Featured

performing-docker-bench-security-assessment

Docker Bench for Security is an open-source script that checks dozens of common best practices around deploying Docker containers in production. Based on the CIS Docker Benchmark, it audits host confi

13,115 Updated today
mukul975
DevOps & Infrastructure Listed

docker-optimizer

Reviews Dockerfiles for best practices, security issues, and image size optimizations including multi-stage builds and layer caching. Use when working with Docker, containers, or deployment.

335 Updated today
aiskillstore
DevOps & Infrastructure Listed

docker-security

Opt-in advanced wizard for Docker security hardening beyond v1.0.26 baseline. Adds LAN containment with DNS policy (firewall + DNS sidecar), resource bounds with kernel hygiene sysctls, and a boot-time plugin install audit log. Each toggle is opt-in with honest cost/benefit framing, applied as a docker-compose overlay (does not modify the base compose file), verified against the live container, and fully reversible. Run after /docker-setup; requires bridge networking.

59 Updated today
gtapps
DevOps & Infrastructure Listed

container-security-scanner

Scan images and runtime for CVEs and policy violations.

3 Updated 1 months ago
majiayu000