Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
OdinVex opened this issue Jan 28, 2025 · 1 comment
Open

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

OdinVex opened this issue Jan 28, 2025 · 1 comment
Assignees

Comments

@OdinVex
Copy link

OdinVex commented Jan 28, 2025

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
Copy link
Author

OdinVex commented Jan 28, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants