2017-06-20 06:53:34 +00:00
|
|
|
#!/bin/sh
|
2018-05-06 18:43:47 +00:00
|
|
|
if [ "$1" == "install" ]; then
|
|
|
|
if [ -d /host ]; then
|
|
|
|
mkdir -p /host/cfg/
|
2018-05-11 14:39:11 +00:00
|
|
|
yes | cp -rf cfg/* /host/cfg/
|
|
|
|
yes | cp -rf /usr/local/bin/kube-bench /host/
|
2018-05-06 18:43:47 +00:00
|
|
|
echo "==============================================="
|
|
|
|
echo "kube-bench is now installed on your host "
|
|
|
|
echo "Run ./kube-bench to perform a security check "
|
|
|
|
echo "==============================================="
|
|
|
|
else
|
|
|
|
echo "Usage:"
|
|
|
|
echo " install: docker run --rm -v \`pwd\`:/host aquasec/kube-bench install"
|
|
|
|
echo " run: docker run --rm --pid=host aquasec/kube-bench [command]"
|
|
|
|
exit
|
|
|
|
fi
|
2017-06-20 06:53:34 +00:00
|
|
|
else
|
2018-05-06 18:43:47 +00:00
|
|
|
exec kube-bench "$@"
|
2017-06-20 06:53:34 +00:00
|
|
|
fi
|