mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
Fix check_2 to -le 644
Issue #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 19202716+jammasterj89@users.noreply.github.com
This commit is contained in:
parent
8bd04d683f
commit
47e4cc173c
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ check_3_2() {
|
|||
totalChecks=$((totalChecks + 1))
|
||||
file="$(get_service_file docker.service)"
|
||||
if [ -f "$file" ]; then
|
||||
if [ "$(stat -c %a $file)" -eq 644 ] || [ "$(stat -c %a $file)" -eq 600 ]; then
|
||||
if [ "$(stat -c %a $file)" -le 644 ]; then
|
||||
pass "$check_3_2"
|
||||
resulttestjson "PASS"
|
||||
currentScore=$((currentScore + 1))
|
||||
|
|
Loading…
Reference in a new issue