2020-12-17 15:56:50 +02:00
[](https://travis-ci.org/aquasecurity/linux-bench)
2019-01-27 16:12:29 +02:00
[](https://opensource.org/licenses/Apache-2.0)
2019-08-06 23:48:11 +03:00
[![Coverage Status][cov-img]][cov]
2020-12-17 15:56:50 +02:00
[cov-img]: https://codecov.io/github/aquasecurity/linux-bench/branch/main/graph/badge.svg
2019-08-06 23:51:33 +03:00
[cov]: https://codecov.io/github/aquasecurity/linux-bench
2019-01-27 16:12:29 +02:00
2019-10-23 11:20:58 +02:00
Linux-bench is a Go application that checks whether the Linux operating system is configured securely by running the checks documented in the CIS Distribution Independent Linux Benchmark.
2019-01-27 16:12:29 +02:00
2019-10-23 11:20:58 +02:00
Tests are configured with YAML files, making this tool easy to update as test specifications evolve.
2019-01-27 16:12:29 +02:00
## CIS Linux Benchmark support
2019-01-27 16:12:29 +02:00
linux-bench currently supports tests for benchmark version 1.1.0 only.
linux-bench will determine the test set to run on the host machine based on the following:
2019-10-11 01:50:31 +05:30
- **Operating system platform - ubuntu/debian/rhel/coreos**
- **Boot loader - grub/grub2**
- **System logging tool - rsyslog/syslog-ng**
- **Lsm - selinux/apparmor**
2019-01-27 16:12:29 +02:00
## Installation
2019-10-23 11:20:58 +02:00
2019-01-27 16:12:29 +02:00
### Installing from sources
2019-10-23 11:20:58 +02:00
Install [Go ](https://golang.org/doc/install ), then
clone this repository and run as follows (assuming your [\$GOPATH is set ](https://github.com/golang/go/wiki/GOPATH )):
2019-01-27 16:12:29 +02:00
```shell
go get github.com/aquasecurity/linux-bench
cd $GOPATH/src/github.com/aquasecurity/linux-bench
go build -o linux-bench .
# See all supported options
./linux-bench --help
# Run checks
./linux-bench
# Run checks for specified linux cis version
2019-01-27 16:12:29 +02:00
./linux-bench --version < version >
2019-01-27 16:12:29 +02:00
```
# Tests
2019-10-23 11:20:58 +02:00
2019-01-27 16:12:29 +02:00
Tests are specified in definition files `cfg/<version>/definitions.yaml.`
2019-01-27 16:12:29 +02:00
Where `<version>` is the version of linux cis for which the test applies.
# Contributing
2019-10-23 11:20:58 +02:00
We welcome PRs and issue reports.