mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-06-22 06:39:08 +00:00
Merge branch 'master' into issue265
This commit is contained in:
commit
25b40c94a2
11 changed files with 36 additions and 29 deletions
|
@ -641,7 +641,8 @@ else
|
|||
|
||||
fail=0
|
||||
for c in $containers; do
|
||||
if docker inspect --format 'SecurityOpt={{.HostConfig.SecurityOpt }}' "$c" | grep 'seccomp:unconfined' 2>/dev/null 1>&2; then
|
||||
if docker inspect --format 'SecurityOpt={{.HostConfig.SecurityOpt }}' "$c" | \
|
||||
grep -E 'seccomp:unconfined|seccomp=unconfined' 2>/dev/null 1>&2; then
|
||||
# If it's the first container, fail the test
|
||||
if [ $fail -eq 0 ]; then
|
||||
warn "$check_5_21"
|
||||
|
|
|
@ -40,7 +40,7 @@ fi
|
|||
check_7_3="7.3 - Ensure swarm services are binded to a specific host interface"
|
||||
totalChecks=$((totalChecks + 1))
|
||||
if docker info 2>/dev/null | grep -e "Swarm:*\sactive\s*" >/dev/null 2>&1; then
|
||||
netstat -lnt | grep -e '\[::]:2377 ' -e ':::2377' -e '*:2377 ' -e ' 0\.0\.0\.0:2377 ' >/dev/null 2>&1
|
||||
ss -lnt | grep -e '\[::]:2377 ' -e ':::2377' -e '*:2377 ' -e ' 0\.0\.0\.0:2377 ' >/dev/null 2>&1
|
||||
if [ $? -eq 1 ]; then
|
||||
pass "$check_7_3"
|
||||
logjson "7.3" "PASS"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue