Skip to content

Commit

Permalink
Merge pull request #99 from yoavrotems/New-cis-version-and-update-ben…
Browse files Browse the repository at this point in the history
…ch-common

New cis version and update bench common
  • Loading branch information
yoavrotems authored Aug 1, 2021
2 parents a6e0cb5 + 1d08388 commit b6e798b
Show file tree
Hide file tree
Showing 6 changed files with 2,360 additions and 47 deletions.
7 changes: 4 additions & 3 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ import (
)

var benchmarkVersionMap = map[string]string{
"cis-1.2": ">= 18.09",
"cis-1.1": ">= 17.06, < 18.09",
"cis-1.0": ">= 1.13.0, < 17.06",
"cis-1.3.1": ">= 20.04",
"cis-1.2": ">= 18.09, < 20.04",
"cis-1.1": ">= 17.06, < 18.09",
"cis-1.0": ">= 1.13.0, < 17.06",
}

func app(cmd *cobra.Command, args []string) {
Expand Down
2 changes: 2 additions & 0 deletions app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ func Test_getDockerCisVersion(t *testing.T) {
want string
wantErr bool
}{
{name: "Test for version 20.10", stringVersion: "20.10", want: "cis-1.3.1", wantErr: false},
{name: "Test for version 20.04", stringVersion: "20.04", want: "cis-1.3.1", wantErr: false},
{name: "Test for version 18.09", stringVersion: "18.09", want: "cis-1.2", wantErr: false},
{name: "Test for version 19.3.6", stringVersion: "19.3.6", want: "cis-1.2", wantErr: false},
{name: "Test for version 18.06", stringVersion: "18.06", want: "cis-1.1", wantErr: false},
Expand Down
10 changes: 10 additions & 0 deletions cfg/cis-1.3.1/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
## Controls Files.
# These are YAML files that hold all the details for running checks.
# In here you can set all parameter substitution for docker-bench

docker-storage:
value: /var/lib/docker

docker-config-file:
value: /etc/docker/daemon.json
Loading

0 comments on commit b6e798b

Please sign in to comment.