mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-06-20 05:39:08 +00:00
added paths for docker configuration files on redhat based systems
Signed-off-by: Killian Eon <okidor20@gmail.com>
This commit is contained in:
parent
6d5b15788a
commit
4ffc389221
1 changed files with 12 additions and 4 deletions
|
@ -267,12 +267,16 @@ check_1_9() {
|
|||
# 1.10
|
||||
check_1_10() {
|
||||
id_1_10="1.10"
|
||||
desc_1_10="Ensure auditing is configured for Docker files and directories - /etc/default/docker"
|
||||
desc_1_10="Ensure auditing is configured for Docker files and directories - /etc/default/docker - /etc/sysconfig/docker"
|
||||
check_1_10="$id_1_10 - $desc_1_10"
|
||||
starttestjson "$id_1_10" "$desc_1_10"
|
||||
|
||||
totalChecks=$((totalChecks + 1))
|
||||
file="/etc/default/docker"
|
||||
if [ -d /etc/sysconfig ]; then
|
||||
file="/etc/sysconfig/docker"
|
||||
else
|
||||
file="/etc/default/docker"
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
if command -v auditctl >/dev/null 2>&1; then
|
||||
if auditctl -l | grep $file >/dev/null 2>&1; then
|
||||
|
@ -378,12 +382,16 @@ check_1_12() {
|
|||
# 1.13
|
||||
check_1_13() {
|
||||
id_1_13="1.13"
|
||||
desc_1_13="Ensure auditing is configured for Docker files and directories - /usr/bin/docker-runc"
|
||||
desc_1_13="Ensure auditing is configured for Docker files and directories - /usr/bin/docker-runc - /usr/libexec/docker/docker-runc-current"
|
||||
check_1_13="$id_1_13 - $desc_1_13"
|
||||
starttestjson "$id_1_13" "$desc_1_13"
|
||||
|
||||
totalChecks=$((totalChecks + 1))
|
||||
file="/usr/bin/docker-runc"
|
||||
if [ -d /usr/libexec/docker ]; then
|
||||
file="/usr/libexec/docker/docker-runc-current"
|
||||
else
|
||||
file="/usr/bin/docker-runc"
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
if command -v auditctl >/dev/null 2>&1; then
|
||||
if auditctl -l | grep $file >/dev/null 2>&1; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue