mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
exclude first ADD since its most often the base #362
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
f01acac650
commit
cec124a162
1 changed files with 2 additions and 2 deletions
|
@ -224,8 +224,8 @@ check_4_9() {
|
|||
fail=0
|
||||
add_images=""
|
||||
for img in $images; do
|
||||
docker history "$img" 2> /dev/null | grep 'ADD' >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
if docker history --format "{{ .CreatedBy }}" --no-trunc "$img" | sed '$d' |\
|
||||
grep -q 'ADD'; then
|
||||
if [ $fail -eq 0 ]; then
|
||||
fail=1
|
||||
info "$check_4_9"
|
||||
|
|
Loading…
Reference in a new issue