aquasecurity / docker-bench

Checks whether Docker is deployed according to security best practices as defined in the CIS Docker Benchmark

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"test_number": "5.4" Include container name rather than container ID?

akshaya835 opened this issue · comments

It would be better suited to include container name than ID - makes it much easier to pickup which containers/apps are running as privileged

So for 5.4 Change audit command from:
"docker ps --quiet --all | xargs docker inspect --format '{{ .Id }}:Privileged={{ .HostConfig.Privileged }}'",

to:
"docker ps --quiet --all | xargs docker inspect --format '{{ .Name }}:Privileged={{ .HostConfig.Privileged }}'",

Hey thanks for opening an issue, we take the tests from CIS benchmark, https://github.com/aquasecurity/docker-bench#cis-docker-benchmark-support (Here you can see the links)
We try as possible not to change the tests especially if it works as it should.
So I'm closing this issue, if you believe using .Name would be better you are welcome to open a ticket to CIS