Skip to content

Commit 29666c6

Browse files
author
Harshvardhan Karn
authored
changes to support fargate (#10)
1 parent a655fd4 commit 29666c6

File tree

9 files changed

+41
-41
lines changed

9 files changed

+41
-41
lines changed

scanner/executor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (b *Bench) RunScripts(ctx context.Context) ([]benchItem, error) {
4242
for _, destPath := range b.Script.Files {
4343

4444
var errb, outb bytes.Buffer
45-
cmd := exec.CommandContext(ctx, "bash", destPath)
45+
cmd := exec.CommandContext(ctx, "bash", getDfInstallDir()+destPath)
4646
cmd.Env = os.Environ()
4747
for _, variable := range b.Script.Vars {
4848
value := os.Getenv(variable)

scripts/gdpr.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
source /usr/local/bin/compliance_check/scripts/common.sh
2-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
3-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/1_host_configuration.sh
4-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/2_docker_daemon_configuration.sh
5-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/3_docker_daemon_configuration_files.sh
6-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/4_container_images.sh
7-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/5_container_runtime.sh
1+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/common.sh
2+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
3+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/1_host_configuration.sh
4+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/2_docker_daemon_configuration.sh
5+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/3_docker_daemon_configuration_files.sh
6+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/4_container_images.sh
7+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/5_container_runtime.sh
88

99
check_1_1_3
1010
check_1_1_4

scripts/gdprkube.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
source /usr/local/bin/compliance_check/scripts/common.sh
2-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
3-
source /usr/local/bin/compliance_check/scripts/kube-bench/helper1_6_0.sh
1+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/common.sh
2+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
3+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/kube-bench/helper1_6_0.sh
44
if [ -z "${NODE_TYPE}" ]
55
then
66
NODE_TYPE="master"

scripts/hipaa.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
source /usr/local/bin/compliance_check/scripts/common.sh
2-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
3-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/1_host_configuration.sh
4-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/2_docker_daemon_configuration.sh
5-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/3_docker_daemon_configuration_files.sh
6-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/4_container_images.sh
7-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/5_container_runtime.sh
1+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/common.sh
2+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
3+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/1_host_configuration.sh
4+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/2_docker_daemon_configuration.sh
5+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/3_docker_daemon_configuration_files.sh
6+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/4_container_images.sh
7+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/5_container_runtime.sh
88

99
check_1_1_2
1010
check_1_1_3

scripts/hipaakube.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
source /usr/local/bin/compliance_check/scripts/common.sh
2-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
3-
source /usr/local/bin/compliance_check/scripts/kube-bench/helper1_6_0.sh
1+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/common.sh
2+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
3+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/kube-bench/helper1_6_0.sh
44
if [ -z "${NODE_TYPE}" ]
55
then
66
NODE_TYPE="master"

scripts/nist.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
source /usr/local/bin/compliance_check/scripts/common.sh
2-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
3-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/1_host_configuration.sh
4-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/2_docker_daemon_configuration.sh
5-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/3_docker_daemon_configuration_files.sh
6-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/4_container_images.sh
7-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/5_container_runtime.sh
1+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/common.sh
2+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
3+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/1_host_configuration.sh
4+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/2_docker_daemon_configuration.sh
5+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/3_docker_daemon_configuration_files.sh
6+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/4_container_images.sh
7+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/5_container_runtime.sh
88

99
check_1_2_2
1010
check_1_1_18

scripts/nistkube.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
source /usr/local/bin/compliance_check/scripts/common.sh
2-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
3-
source /usr/local/bin/compliance_check/scripts/kube-bench/helper1_6_0.sh
1+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/common.sh
2+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
3+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/kube-bench/helper1_6_0.sh
44
if [ -z "${NODE_TYPE}" ]
55
then
66
NODE_TYPE="master"

scripts/pci.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
source /usr/local/bin/compliance_check/scripts/common.sh
2-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
3-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/1_host_configuration.sh
4-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/2_docker_daemon_configuration.sh
5-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/3_docker_daemon_configuration_files.sh
6-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/4_container_images.sh
7-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/5_container_runtime.sh
1+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/common.sh
2+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
3+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/1_host_configuration.sh
4+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/2_docker_daemon_configuration.sh
5+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/3_docker_daemon_configuration_files.sh
6+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/4_container_images.sh
7+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/5_container_runtime.sh
88

99
check_1_2_2
1010
check_1_1_18

scripts/pcikube.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
source /usr/local/bin/compliance_check/scripts/common.sh
2-
source /usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
3-
source /usr/local/bin/compliance_check/scripts/kube-bench/helper1_6_0.sh
1+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/common.sh
2+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
3+
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/kube-bench/helper1_6_0.sh
44
if [ -z "${NODE_TYPE}" ]
55
then
66
NODE_TYPE="master"

0 commit comments

Comments
 (0)