docker-bench-security icon indicating copy to clipboard operation
docker-bench-security copied to clipboard

Sed error when specifying checks to include and exclude when runnning on a Mac

Open gavinmporter opened this issue 1 year ago • 1 comments

I'm using docker-bench-security on a Mac to check images.

Using parameters that specify both checks to include and exclude results in a sed error on BSD systems. For example,

$ sh docker-bench-security.sh -c container_images -e check_4_5
sed: 1: "/container_images() {/, ...": extra characters at the end of p command

sed_bsd_p_fix.txt

This can be fixed by modifying the sed command to add an explicit semi-colon after the p, see attached patch.

gavinmporter avatar Jul 18 '22 04:07 gavinmporter

Hi @gavinmporter and thanks for opening this issue. Can you create an PR with that patch?

konstruktoid avatar Jul 18 '22 08:07 konstruktoid