# hadolint/hadolint

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/hadolint-hadolint).**

12,225 stars · 495 forks · Haskell · GPL-3.0

## Links

- GitHub: https://github.com/hadolint/hadolint
- awesome-repositories: https://awesome-repositories.com/repository/hadolint-hadolint.md

## Topics

`docker` `dockerfile` `dockerfile-linter` `haskell` `linter` `shellcheck` `static-analysis`

## Description

Hadolint is a static analysis tool designed to validate container build configurations. It functions as a security scanner and configuration auditor, parsing build instructions into a structured format to identify deviations from security and efficiency standards.

The tool distinguishes itself by performing deep inspection of embedded shell commands. By tokenizing and analyzing these scripts, it detects common scripting errors and security vulnerabilities that might otherwise persist within a container image. It integrates external analysis tools to provide specialized validation for these inline commands, ensuring that both the container structure and the execution logic are evaluated.

Beyond basic syntax checking, the utility supports automated workflows by identifying inefficient layer creation and insecure configuration settings. It is designed for integration into continuous integration and deployment pipelines to catch configuration issues before images are built. The project provides a command-line interface for executing these audits across container definitions.

## Tags

### DevOps & Infrastructure

- [Container Image Analyzers](https://awesome-repositories.com/f/devops-infrastructure/containerization/image-inspection/container-image-analyzers.md) — Analyzes container build configurations to identify syntax errors and ensure adherence to best practices. ([source](https://hadolint.github.io/hadolint))
- [Container Image Optimizers](https://awesome-repositories.com/f/devops-infrastructure/container-orchestration/image-management-tools/container-image-optimizers.md) — Identifies inefficient layer creation and configuration settings to produce smaller and more efficient container images.
- [Container CI/CD Pipelines](https://awesome-repositories.com/f/devops-infrastructure/container-ci-cd-pipelines.md) — Integrates automated configuration audits into CI/CD pipelines to catch issues early in the build process.

### Security & Cryptography

- [Container Security Scanners](https://awesome-repositories.com/f/security-cryptography/container-security-scanners.md) — Validates build configurations to identify security vulnerabilities and inefficient construction patterns.
- [Security Testing and Auditing](https://awesome-repositories.com/f/security-cryptography/vulnerability-assessment-testing/security-testing-auditing.md) — Audits container build files to identify security vulnerabilities and misconfigurations prior to deployment.

### Software Engineering & Architecture

- [Static Analysis Rule Engines](https://awesome-repositories.com/f/software-engineering-architecture/static-analysis-rule-engines.md) — Applies predefined logic checks against parsed instruction trees to enforce security and efficiency standards.

### Part of an Awesome List

- [Infrastructure as Code Analysis](https://awesome-repositories.com/f/awesome-lists/devops/infrastructure-as-code-analysis.md) — Validates Dockerfiles against best-practice rules.
- [Dockerfile Utilities](https://awesome-repositories.com/f/awesome-lists/devtools/dockerfile-utilities.md) — Linter for best practices and common Dockerfile mistakes.
- [Linting And Formatting](https://awesome-repositories.com/f/awesome-lists/devtools/linting-and-formatting.md) — Linter for Dockerfiles and inline bash.
- [Web Tools](https://awesome-repositories.com/f/awesome-lists/devtools/web-tools.md) — Listed in the “Web Tools” section of the The Book Of Secret Knowledge awesome list.

### Development Tools & Productivity

- [Shell Scripting Linters](https://awesome-repositories.com/f/development-tools-productivity/shell-scripting-linters.md) — Inspects embedded shell scripts to detect common scripting errors and security vulnerabilities before image creation. ([source](https://hadolint.github.io/hadolint))

### Artificial Intelligence & ML

- [Pattern Matching Engines](https://awesome-repositories.com/f/artificial-intelligence-ml/pattern-matching-engines.md) — Evaluates build steps against known anti-patterns to identify inefficient layer creation and insecure configurations.
