Skip to content

Commit

Permalink
Change several checks in definitions.yaml
Browse files Browse the repository at this point in the history
The following checks were changed:
2.16: changed to nothave instead of has as this is checking that seccomp profile is *not* default.
2.18: added check --no-new-privileges flag is set without a value.
3.7: changed to check that root:root is present.
4.1: Changed flag to "User", added check that User is not equal to 1
  • Loading branch information
semion-a committed Aug 23, 2018
1 parent e15ff82 commit c27155f
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions cfg/17.06/definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ groups:
test_items:
- flag: "profile"
compare:
op: has
op: nothave
value: "default"
set: true
remediation: |
Expand Down Expand Up @@ -502,11 +502,14 @@ groups:
(Scored)"
audit: ps -ef | grep dockerd
tests:
bin_op: or
test_items:
- flag: "--no-new-privileges"
compare:
op: noteq
value: "false"
op: eq
value: "true"
set: true
- flag: "--no-new-privileges"
set: true
remediation: |
Run the Docker daemon as below:
Expand Down Expand Up @@ -646,9 +649,6 @@ groups:
tests:
test_items:
- flag: "root:root"
compare:
op: eq
value: ""
set: true
remediation: |
chown root:root /etc/docker/certs.d/<registry-name>/*
Expand Down Expand Up @@ -859,12 +859,23 @@ groups:
description: "Ensure a user for the container has been created (Scored)"
audit: "docker ps --quiet --all | xargs docker inspect --format '{{ .Id }}: User={{ .Config.User }}'"
tests:
bin_op: and
test_items:
- flag: "root"
- flag: "User"
compare:
op: nothave
value: "root"
set: true
- flag: "User"
compare:
op: noteq
value: ""
set: true
- flag: "User"
compare:
op: noteq
value: "1"
set: true
remediation: |
Ensure that the Dockerfile for the container image contains below instruction:
USER <username or ID>
Expand Down

0 comments on commit c27155f

Please sign in to comment.