Impact & Risk Analysis
- Severity: Low
- CIS Benchmark: CIS 4.6
- Impact: Availability Loss. An important security control is availability. Without a
HEALTHCHECKinstruction, the Docker engine cannot verify if a container is still operational. A container might be running but unresponsive (e.g., deadlocked), and the engine will not know to terminate and restart it.
Common Misconfiguration
Failing to add theHEALTHCHECK instruction to Docker container images. By default, HEALTHCHECK is not set, meaning the Docker engine assumes the container is healthy as long as the process is running, even if it is stuck or erroring out.
Vulnerable Example
Secure Example
Audit Procedure
You should run the command below to ensure that Docker images have the appropriateHEALTHCHECK instruction configured:
- Result: This should return the configured health check parameters.
- Fail: If it returns
<no value>ornil, the instruction is missing.
Remediation
You should follow the Docker documentation and rebuild your container images to include theHEALTHCHECK instruction. This ensures that the Docker engine periodically checks the running container instances against that instruction to verify they are operational.
