Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker CIS benchmarks analysis: Error connecting to docker daemon (does docker ps work?) #159

Open
za opened this issue Jul 16, 2024 · 3 comments

Comments

@za
Copy link
Contributor

za commented Jul 16, 2024

Hi,

I am trying the Docker CIS benchmark scenario: https://madhuakula.com/kubernetes-goat/docs/scenarios/scenario-5/docker-cis-benchmarks-in-kubernetes-containers/welcome

I am able to login to the daemonset pod, but somehow unable to run the Docker CIS shell script:

~/docker-bench-security # sh docker-bench-security.sh
Error connecting to docker daemon (does docker ps work?)

~/docker-bench-security # docker ps
Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/json: net/http: HTTP/1.x transport connection broken: malformed HTTP response "\x00\x00\x06\x04\x00\x00\x00\x00\x00\x00\x05\x00\x00@\x00".
* Are you trying to connect to a TLS-enabled daemon without TLS?
➜  ~ kubectl get daemonsets
NAME                    DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
docker-bench-security   2         2         2       2            2           <none>          11m
@za
Copy link
Contributor Author

za commented Jul 29, 2024

Hi @madhuakula once you have time, can you check on this? Thanks.

@za
Copy link
Contributor Author

za commented Aug 5, 2024

Hmm... CMIIW, this only works if we don't deploy into a managed-kubernetes service such as: AKS, EKS and/or GKE.

Note: Maybe we should improve the docs.

@madhuakula
Copy link
Owner

It's due to the container runtime, as the default runtime and socket is not available. Will try to push https://github.com/nokia/containerd-bench-security with both hacker-container and also the benchmarking. So we can update documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants