CL-0014: Logging driver set to none¶
Severity: LOW (how it is derived)
logging.driver: none makes Docker discard everything the container writes to
stdout and stderr, so there is nothing to read back after an incident. Remove
it, or set a driver that keeps the logs.
Fix¶
Remove driver: none to use the default logging driver, or configure an appropriate one:
# Before
services:
app:
image: myapp:1.0
logging:
driver: none
# After
services:
app:
image: myapp:1.0
logging:
driver: json-file
options:
max-size: 10m
max-file: '3'
For centralized logging, use syslog, fluentd, or gelf drivers with appropriate endpoints.
- Let compose-lint write it. When the
logging:block holds onlydriver: none,fixremoves it, so the service falls back to the daemon's default driver (withoptions:beside it, or on a service that usesextends:and so may inherit alogging:block,fixleaves the block to you); it shows the diff and writes nothing until you add--apply:
compose-lint fix --only CL-0014 compose.yaml # show the diff
compose-lint fix --only CL-0014 --apply compose.yaml # write it
Add the json-file options above afterwards if you want rotation set in
the file rather than in the daemon's configuration.
- Recreate the service and check its logs are kept:
docker compose up -d app
docker inspect --format '{{.HostConfig.LogConfig.Type}}' $(docker compose ps -q app)
# json-file (the daemon's default driver)
docker compose logs app
Under driver: none the same logs command prints a warning instead of
output: Error response from daemon: configured logging driver does not
support reading.
- Check the finding is gone:
compose-lint -q compose.yaml | grep CL-0014 # prints nothing once fixed
Verified against Docker 29.7.2 with busybox:1.37.
Tested on: Docker 29.7.2 with Compose 5.5.0, on a host without AppArmor (Yama ptrace_scope 1); the Fix steps above were re-run there in October 2026. Also measured in throwaway VMs in October 2026 (Docker 29.9.1 or 29.1.3): with the daemon's default set to local (Ubuntu 24.04 with AppArmor), a service with no logging: block used local and docker logs worked. Not tested: a daemon whose default is none.
What it detects¶
Services with logging.driver set to none. Services using any other driver (e.g., json-file, syslog, fluentd) or services without explicit logging configuration are not flagged.
Why it matters¶
logging.driver: none discards the container's stdout/stderr at the daemon — docker logs, log shippers reading the JSON-file driver, and any centralized aggregator that relies on the runtime see nothing. Application-level logging that writes to a file or remote endpoint is unaffected, but the runtime-level forensic data source is gone. During an incident, anything the workload only emitted on stdout is lost.
This is a forensic gap, not a non-repudiation guarantee — runtime logs are not authenticated or tamper-evident regardless. The cost of recovery during an investigation is the actual harm.
ATT&CK coverage¶
Remediating this finding contributes to mitigating the following MITRE ATT&CK techniques (pinned to ATT&CK v18). compose-lint is a static analyser, so this is mitigation coverage — it detects nothing at runtime.
| Technique | Tactic |
|---|---|
| T1070 Indicator Removal | Stealth |
See also¶
- Hardening guide, step 13 — where this rule fits when hardening a whole file
Severity derivation¶
Derivation (see severity model):
- Baseline: A — the attacker already has code execution in this container, as the workload uid
- Precondition: Removes a mitigation — discarding the runtime log stream grants the attacker nothing. It deletes the evidence an investigator would otherwise have
- Impact: Single container — only this service's stdout and stderr are discarded
- Qualifier/modifier: none
- Derived: Removes a mitigation × Single container = LOW
- Shipped: LOW
- Evidence: Captured observation, no premise check yet: under
--log-driver none,docker logson a container that wrote to stdout returnsError response from daemon: configured logging driver does not support reading, where the default driver returns the line (Docker 29.1.3)
References:
- Docker logging drivers — none driver disables collection
- OWASP Logging Cheat Sheet
- CIS Docker Benchmark 2.14 — Ensure centralized and remote logging is configured (a daemon-level control: this rule relates to it and does not satisfy it. A service with logging on is not thereby logging centrally)
A reference means the rule relates to that source. It does not mean a file with no finding complies with it. The CIS, OWASP and ATT&CK mapping for every rule, and the tags SARIF output carries for it, are on Standards mapping.