docker-bench-security icon indicating copy to clipboard operation
docker-bench-security copied to clipboard

[Bug] 1.1.2 Users list empty (broken by filtration)

Open OdinVex opened this issue 11 months ago • 1 comments

The following is in docker-bench-security/tests/1_host_configuration.sh:

  docker_users=$(grep 'docker' /etc/group)
  if command -v getent >/dev/null 2>&1; then
    docker_users=$(getent group docker)
  fi
  docker_users=$(printf "%s" "$docker_users" | awk -F: '{print $4}')

docker_users=$(grep 'docker' /etc/group)=>docker:x:110: docker_users=$(getent group docker)=>docker:x:110: docker_users=$(printf "%s" "$docker_users" | awk -F: '{print $4}')=>``

The last line destroys the content of docker_users.

OdinVex avatar Jan 28 '25 03:01 OdinVex

Originally thought it had to deal with getent, but it doesn't so ignore that part in the initial post.

OdinVex avatar Jan 28 '25 03:01 OdinVex