All Projects → dev-sec → Cis Docker Benchmark

dev-sec / Cis Docker Benchmark

Licence: apache-2.0
CIS Docker Benchmark - InSpec Profile

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Cis Docker Benchmark

chef-postgres-hardening
This chef cookbook provides security configuration for PostgreSQL.
Stars: ✭ 26 (-91.98%)
Mutual labels:  hardening
cis-benchmark-centOS-8
Auditing Script based on CIS-BENCHMARK CENTOS 8
Stars: ✭ 34 (-89.51%)
Mutual labels:  hardening
chef-jenkins-hardening
⛔ DEPRECATED: A secure jenkins installation
Stars: ✭ 18 (-94.44%)
Mutual labels:  hardening
postgres-baseline
DevSec PostgreSQL Baseline - InSpec Profile
Stars: ✭ 47 (-85.49%)
Mutual labels:  hardening
apparmor.d
Full set of AppArmor profiles (~ 1400 profiles)
Stars: ✭ 32 (-90.12%)
Mutual labels:  hardening
Windows11 Hardening
My Windows 11 x64 security hardening guide
Stars: ✭ 267 (-17.59%)
Mutual labels:  hardening
metabadger
Prevent SSRF attacks on AWS EC2 via automated upgrades to the more secure Instance Metadata Service v2 (IMDSv2).
Stars: ✭ 123 (-62.04%)
Mutual labels:  hardening
Aws Gate
Better AWS SSM Session manager CLI client
Stars: ✭ 294 (-9.26%)
Mutual labels:  hardening
chef-mysql-hardening
This chef cookbook provides security configuration for mysql.
Stars: ✭ 23 (-92.9%)
Mutual labels:  hardening
CIS-Ubuntu-20.04-Ansible
Ansible Role to Automate CIS v1.1.0 Ubuntu Linux 18.04 LTS, 20.04 LTS Remediation
Stars: ✭ 150 (-53.7%)
Mutual labels:  hardening
first-steps-and-hardening-in-ubuntu-server-and-docker
First Steps in Ubuntu (Server) / Hardening and Config With Docker
Stars: ✭ 28 (-91.36%)
Mutual labels:  hardening
nim-contra
Lightweight Self-Documenting Design by Contract Programming and Security Hardened mode.
Stars: ✭ 46 (-85.8%)
Mutual labels:  hardening
terraform-aws-secure-vpc
A terraform module to create a VPC with secure default configurations.
Stars: ✭ 13 (-95.99%)
Mutual labels:  hardening
Zephyrus
Auditing & Hardening script for Kubernetes
Stars: ✭ 45 (-86.11%)
Mutual labels:  hardening
apache-baseline
DevSec Apache Baseline - InSpec Profile
Stars: ✭ 37 (-88.58%)
Mutual labels:  hardening
sigil
AWS SSM Session manager client
Stars: ✭ 67 (-79.32%)
Mutual labels:  hardening
cis-dil-benchmark
CIS Distribution Independent Linux Benchmark - InSpec Profile
Stars: ✭ 120 (-62.96%)
Mutual labels:  hardening
Prowler
Prowler is a security tool to perform AWS security best practices assessments, audits, incident response, continuous monitoring, hardening and forensics readiness. It contains more than 200 controls covering CIS, ISO27001, GDPR, HIPAA, SOC2, ENS and other security frameworks.
Stars: ✭ 4,561 (+1307.72%)
Mutual labels:  hardening
H2t
h2t (HTTP Hardening Tool) scans a website and suggests security headers to apply
Stars: ✭ 268 (-17.28%)
Mutual labels:  hardening
chef-nginx-hardening
This chef cookbook provides secure nginx configurations.
Stars: ✭ 50 (-84.57%)
Mutual labels:  hardening

CIS Docker Benchmark - InSpec Profile

Build Status Supermarket Gitter Chat

Description

This InSpec compliance profile implement the CIS Docker 1.13.0 Benchmark in an automated way to provide security best-practice tests around Docker daemon and containers in a production environment.

InSpec is an open-source run-time framework and rule language used to specify compliance, security, and policy requirements for testing any node in your infrastructure.

Requirements

  • at least InSpec version 2.3.23
  • Docker 1.13+

Platform

  • Debian 8
  • Ubuntu 16.04
  • CentOS 7

Attributes

We use a yml attribute file to steer the configuration, the following options are available:

  • trusted_user: vagrant define trusted user to control Docker daemon.
  • authorization_plugin: authz-broker define authorization plugin to manage access to Docker daemon.
  • log_driver: syslog define preferable way to store logs.
  • log_opts: /syslog-address/ define Docker daemon log-opts.
  • registry_cert_path: /etc/docker/certs.d directory contains various Docker registry directories.
  • registry_name: /etc/docker/certs.d/registry_hostname:port directory contain certificate certain Docker registry.
  • registry_ca_file: /etc/docker/certs.d/registry_hostname:port/ca.crt certificate file for a certain Docker registry certificate files.
  • container_user: vagrant define user within containers.
  • app_armor_profile: docker-default define apparmor profile for Docker containers.
  • selinux_profile: /label\:level\:s0-s0\:c1023/ define SELinux profile for Docker containers.
  • container_capadd: null define needed capabilities for containers. example: container_capadd: NET_ADMIN,SYS_ADMIN
  • managable_container_number: 25 keep number of containers on a host to a manageable total.
  • daemon_tlscacert : /etc/docker/ssl/ca.pem configure the
  • daemon_tlscert: /etc/docker/ssl/server_cert.pem configure the server certificate.
  • daemon_tlskey: /etc/docker/ssl/server_key.pem configure the server key.
  • swarm_mode: inactive configure the swarm mode.
  • swarm_max_manager_nodes: 3 configure the maximum number of swarm leaders.
  • swarm_port: 2377 configure the swarm port.
  • benchmark_version to execute also the old controls from previous benchmarks, e.g. set it to 1.12.0 to execute also the tests from cis-benchmark-1.12.0 (which is the default).

These settings can be overriden using an attributes file (e.g. --attrs <attributefile.yml>). See sample_attributes.yml as an example.

Usage

InSpec makes it easy to run your tests wherever you need. More options listed here: InSpec cli

# run profile locally
$ git clone https://github.com/dev-sec/cis-docker-benchmark
$ inspec exec cis-docker-benchmark

# run profile locally and directly from Github
$ inspec exec https://github.com/dev-sec/cis-docker-benchmark

# run profile on remote host via SSH
inspec exec cis-docker-benchmark -t ssh://[email protected] -i /path/to/key

# run profile on remote host via SSH with sudo
inspec exec cis-docker-benchmark -t ssh://[email protected] -i /path/to/key --sudo

# run profile on remote host via SSH with sudo and define attribute value
inspec exec cis-docker-benchmark --attrs sample_attributes.yml

# run profile direct from inspec supermarket
inspec supermarket exec dev-sec/cis-docker-benchmark -t ssh://[email protected] --key-files private_key --sudo

Run individual controls

In order to verify individual controls, just provide the control ids to InSpec:

inspec exec cis-docker-benchmark --controls 'cis-docker-benchmark-1.4 cis-docker-benchmark-1.5'

Contributors + Kudos

License and Author

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].