Describe the bug
Remediation that requires creating a new OS user/group won't be presented to the user even though it took effect.
Preconditions
A Containerized cloudbeat using a Kind cluster.
To Reproduce
- Verify CIS rule 1.1.12 is failing the evaluation.
- Apply remediation:
- SSH to host (kind cluster)
groupadd etcd
useradd -g etcd etcd
chown etcd:etcd /var/lib/etcd/
- Wait a cycle for new results to be presented
- CIS rule 1.1.12 is still failing the evaluation.
Expected behavior
CIS rule 1.1.12 is should pass as we apply the right remediation.
Investigation conclusions
- group and user info can be found in
/etc/group & /etc/passwd respectively.
- In order to propagate this data to cloudbeat we mount those files to the elastic-agent.
- In the case of a missing user/group we use the
useradd/groupadd commands.
- Those commands edit the mentioned files and modify their inodes.
- When you mount an individual file into a container, what you are mounting is the inode of the file on the FS (discussion).
As a result, the files inside the container are not synced.
Proposed solution
Mounting an entire directory will solve the issue because the directory's pointer to the inode gets updated.
Having said that, we don't want to mount the entire etc directory, therefore, we can create a new folder to mount and symlink the mentioned files.
Screenshots
useradd cmd modify /etc/passwd file inode.

Related issue:
Describe the bug
Remediation that requires creating a new OS user/group won't be presented to the user even though it took effect.
Preconditions
A Containerized cloudbeat using a Kind cluster.
To Reproduce
groupadd etcduseradd -g etcd etcdchown etcd:etcd /var/lib/etcd/Expected behavior
CIS rule 1.1.12 is should pass as we apply the right remediation.
Investigation conclusions
/etc/group&/etc/passwdrespectively.useradd/groupaddcommands.As a result, the files inside the container are not synced.
Proposed solution
Mounting an entire directory will solve the issue because the directory's pointer to the inode gets updated.
Having said that, we don't want to mount the entire
etcdirectory, therefore, we can create a new folder to mount and symlink the mentioned files.Screenshots
useraddcmd modify/etc/passwdfile inode.Related issue: