mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
fix 2.18
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
e169d99736
commit
bdeaeaa05a
1 changed files with 2 additions and 2 deletions
|
@ -379,11 +379,11 @@ check_2_17() {
|
|||
check_2_18() {
|
||||
check_2_18="2.18 - Ensure containers are restricted from acquiring new privileges"
|
||||
totalChecks=$((totalChecks + 1))
|
||||
if get_docker_effective_command_line_args '--no-new-privileges' >/dev/null 2>&1; then
|
||||
if get_docker_effective_command_line_args '--no-new-privileges' | grep "no-new-privileges" >/dev/null 2>&1; then
|
||||
pass "$check_2_18"
|
||||
logjson "2.18" "PASS"
|
||||
currentScore=$((currentScore + 1))
|
||||
elif get_docker_configuration_file_args 'no-new-privileges' >/dev/null 2>&1; then
|
||||
elif get_docker_configuration_file_args 'no-new-privileges' | grep true >/dev/null 2>&1; then
|
||||
pass "$check_2_18"
|
||||
logjson "2.18" "PASS"
|
||||
currentScore=$((currentScore + 1))
|
||||
|
|
Loading…
Reference in a new issue