mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 00:32:34 +01:00
fix 5.28
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
261e3f2611
commit
77a3bc65d7
1 changed files with 2 additions and 2 deletions
|
@ -1112,9 +1112,9 @@ check_5_28() {
|
||||||
fail=0
|
fail=0
|
||||||
nopids_limit_containers=""
|
nopids_limit_containers=""
|
||||||
for c in $containers; do
|
for c in $containers; do
|
||||||
pidslimit=$(docker inspect --format '{{.HostConfig.PidsLimit }}' "$c")
|
pidslimit="$(docker inspect --format '{{.HostConfig.PidsLimit }}' "$c")"
|
||||||
|
|
||||||
if [ "$pidslimit" -le 0 ]; then
|
if [ "$pidslimit" = "0" ] || [ "$pidslimit" = "<nil>" ] || [ "$pidslimit" = "-1" ]; then
|
||||||
# If it's the first container, fail the test
|
# If it's the first container, fail the test
|
||||||
if [ $fail -eq 0 ]; then
|
if [ $fail -eq 0 ]; then
|
||||||
warn "$check_5_28"
|
warn "$check_5_28"
|
||||||
|
|
Loading…
Reference in a new issue