docker-bench

command module
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

README

GitHub Release License Coverage Status GitHub Build Actions GitHub Release Actions

Docker-bench is a Go application that checks whether Docker is deployed securely by running the checks documented in the CIS Docker Benchmark.

Tests are configured with YAML files, making this tool easy to update as test specifications evolve.

CIS Docker Benchmark support

docker-bench currently supports tests as defined in the following CIS Docker Benchmarks:

CIS Benchmark docker-bench cfg directory Docker versions
Docker Benchmark v1.2.0 cis-1.2 18.09 and Docker Enterprise 2.1
Docker Community Edition Benchmark v1.1.0 cis-1.1 17.06
Docker Benchmark v1.0.0 cis-1.0 1.13.0

docker-bench will determine the test set to run based on the Docker version running on the host machine. The version to run tests for can also be specified manually with the --version <Docker version> or --benchmark <CIS benchmark version> commandline flag.

Installation

Installing from sources

Install Go, then clone this repository and run as follows (assuming your $GOPATH is set):

go get github.com/aquasecurity/docker-bench
cd $GOPATH/src/github.com/aquasecurity/docker-bench
go build -o docker-bench .

# See all supported options
./docker-bench --help

# Run checks
./docker-bench

# Run checks for specified Docker version
./docker-bench --version 18.09

# Run checks for specified cis Benchmark 
./docker-bench --benchmark cis-1.2

Tests

Tests are specified in definition files cfg/<version>/definitions.yaml, where <version> is the version of CIS for which the test applies.

Contributing

We welcome PRs and issue reports. Your PR is more likely to be accepted if it focuses on just one change. Please include a comment with the results before and after your change. Your PR is more likely to be accepted if it includes tests. (We have not historically been very strict about tests, but we would like to improve this!). You're welcome to submit a draft PR if you would like early feedback on an idea or an approach. Happy coding!

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL