No need to run install.sh.

Simply clone the project, compile the go app and run ./cis_kubernetes
pull/5/head
Amir Jerbi 7 years ago
parent 26cc77ec1d
commit 55fd838191

@ -8,15 +8,27 @@ Tests are configured with YAML files, making this tool easy to update as test sp
You will need to run this application on the target machines that you want to test.
If Go is installed on the target machines, you can simply clone this repository, build and install as follows:
If Go is installed on the target machines, you can simply clone this repository and as follows:
```go build -o cis_kubernetes .```
```./install.sh```
The installation script creates a directory ~/.cis_kubernetes and copies the test config files there.
## Usage
```./cis_kubernetes [command]```
Available Commands:
master Checks for Kubernetes master node
node Checks for Kubernetes node
federated Checks for Kubernetes federated deployment
help Help information
Flags:
-c, --check string A comma-delimited list of checks to run as specified in CIS document. Example --check="1.1.1,1.1.2"
-g, --group string Run all the checks under this comma-delimited list of groups. Example --group="1.1"
-h, --help help for cis_kubernetes
--json Output results as JSON
## Test config YAML representation
The tests are represented as YAML documents (installed by default into ~/.cis_kubernetes).
The tests are represented as YAML documents (installed by default into ./cfg).
An example is as listed below:
```

@ -3,9 +3,9 @@
# These are YAML files that hold all the details for running checks.
#
## Uncomment to use different control file paths.
# masterControls: $HOME/.cis_kubernetes/master.yaml
# nodeControls: $HOME/.cis_kubernetes/node.yaml
# federatedControls: $HOME/.cis_kubernetes/federated.yaml
# masterControls: ./cfg/master.yaml
# nodeControls: ./cfg/node.yaml
# federatedControls: ./cfg/federated.yaml
## Configuration Directories.
# Specifies the directories to look for configuration files

@ -23,7 +23,7 @@ import (
)
var (
cfgDir = os.Getenv("HOME") + "/.cis_kubernetes"
cfgDir = "./cfg"
cfgFile string
jsonFmt bool

@ -1,12 +0,0 @@
#!/bin/bash
cfgdir="$HOME/.cis_kubernetes"
echo "create cis_kubernetes configuration directory"
mkdir $cfgdir
echo "copy cis_kubernetes configuration file"
cp cfg/config.yaml $cfgdir
echo "copy controls files to configuration directory"
cp cfg/{master,node,federated}.yaml $cfgdir
Loading…
Cancel
Save