TMA-BOTTLEROCKET-ADMIN-CONTAINER
Ensure the admin host container is disabled when not in use
Description
The admin container is privileged and can obtain a root shell on the host (sheltie) and runs an SSH server. It should be enabled only for troubleshooting. The audit runs "apiclient get settings.host-containers.admin.enabled"; run it from the control container (for example via SSM: apiclient exec control ...), since running it inside the admin container proves the container is on and the rule will fail.
How it is checked
Audit method: Shell command
out=$(apiclient get settings.host-containers.admin.enabled 2>/dev/null) || exit 1
v=$(printf '%s' "$out" | tr -d ' \n' | sed -n 's/.*"enabled":\([a-z]*\).*/\1/p')
[ "$v" = false ] && echo compliant- Expected output
compliant
How it is fixed
Fix method: Guidance or infrastructure patch
Set in user data: [settings.host-containers.admin] enabled = false, or after troubleshooting run from the control container: apiclient set host-containers.admin.enabled=false.
Properties
- Operating systems
- Any
- Tags
- bottlerockethost-containersaccess-control
- Reference
- CIS Bottlerocket Benchmark - Host containers / administrative access (verify section number for your release)
Check this host
Run this on a machine you are allowed to audit. The scan is read-only.
tmaegis scan --target bottlerocket