DL1001 : Avoid inline ignore pragmas
Description
Inline # hadolint ignore=DLxxxx directives disable lint rules and should be avoided to ensure all checks run.
Goals
- Prevent bypassing lint rules by embedding ignore pragmas.
- Ensure consistent policy enforcement in Dockerfiles.
Specification
- Parse the Dockerfile and iterate over each instruction and its preceding comments.
- If any comment or instruction contains the case-insensitive substring
hadolint ignore=, emit DL1001.
- The finding points to the line where the pragma appears.
(c) 2025 Asymmetric Effort, LLC. scaldwell@asymmetric-effort.com
