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

docker.service file permission is 640 but it is still giving a WARN notification #459

Closed
adespain opened this issue Jan 12, 2021 · 6 comments

Comments

@adespain
Copy link

My docker.service file permissions are more restrictive than 644, they are set to 640 and yet it still says WARN and says:

[WARN] 3.2 - Ensure that docker.service file permissions are set to 644 or more restrictive

@konstruktoid
Copy link
Collaborator

Hi @adespain, thanks for reporting this.

You are correct, the script only checks for 644 and 0600 (https://github.com/docker/docker-bench-security/blob/master/tests/3_docker_daemon_configuration_files.sh#L50).

I'll make it more flexible as soon as possible.

jammasterj89 added a commit to jammasterj89/docker-bench-security that referenced this issue Jan 15, 2021
Issue docker#459 raised that check_2 was only checking for 644 or 600 permissions, this now checks for anything less than or equal to 644.

Signed-off-by: Niall T [email protected]
@konstruktoid
Copy link
Collaborator

@adespain, can you verify since #461 has been merged?

@adespain
Copy link
Author

I am still getting the warning. This is what I run so maybe the image needs to be updated?

docker run --rm --net host --pid host --userns host --cap-add audit_control \
    -e DOCKER_CONTENT_TRUST=$DOCKER_CONTENT_TRUST \
    -v /etc:/etc:ro \
    -v /lib/systemd/system:/lib/systemd/system:ro \
    -v /usr/bin/containerd:/usr/bin/containerd:ro \
    -v /usr/bin/runc:/usr/bin/runc:ro \
    -v /usr/lib/systemd:/usr/lib/systemd:ro \
    -v /var/lib:/var/lib:ro \
    -v /var/run/docker.sock:/var/run/docker.sock:ro \
    --label docker_bench_security \
    docker/docker-bench-security

@konstruktoid
Copy link
Collaborator

Hi @adespain, that's a classic: #405

@adespain
Copy link
Author

Ha ha, looks like someone needs to use a gps tracker on the signing keys 😆

@konstruktoid
Copy link
Collaborator

Closing due to inactivity.

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