Skip to content

Commit

Permalink
changes to support fargate (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Harshvardhan Karn authored Feb 1, 2024
1 parent a655fd4 commit 29666c6
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion scanner/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (b *Bench) RunScripts(ctx context.Context) ([]benchItem, error) {
for _, destPath := range b.Script.Files {

var errb, outb bytes.Buffer
cmd := exec.CommandContext(ctx, "bash", destPath)
cmd := exec.CommandContext(ctx, "bash", getDfInstallDir()+destPath)
cmd.Env = os.Environ()
for _, variable := range b.Script.Vars {
value := os.Getenv(variable)
Expand Down
14 changes: 7 additions & 7 deletions scripts/gdpr.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
source /usr/local/bin/compliance_check/scripts/common.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/1_host_configuration.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/2_docker_daemon_configuration.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/3_docker_daemon_configuration_files.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/4_container_images.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/5_container_runtime.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/common.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/1_host_configuration.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/2_docker_daemon_configuration.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/3_docker_daemon_configuration_files.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/4_container_images.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/5_container_runtime.sh

check_1_1_3
check_1_1_4
Expand Down
6 changes: 3 additions & 3 deletions scripts/gdprkube.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source /usr/local/bin/compliance_check/scripts/common.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
source /usr/local/bin/compliance_check/scripts/kube-bench/helper1_6_0.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/common.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/kube-bench/helper1_6_0.sh
if [ -z "${NODE_TYPE}" ]
then
NODE_TYPE="master"
Expand Down
14 changes: 7 additions & 7 deletions scripts/hipaa.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
source /usr/local/bin/compliance_check/scripts/common.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/1_host_configuration.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/2_docker_daemon_configuration.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/3_docker_daemon_configuration_files.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/4_container_images.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/5_container_runtime.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/common.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/1_host_configuration.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/2_docker_daemon_configuration.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/3_docker_daemon_configuration_files.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/4_container_images.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/5_container_runtime.sh

check_1_1_2
check_1_1_3
Expand Down
6 changes: 3 additions & 3 deletions scripts/hipaakube.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source /usr/local/bin/compliance_check/scripts/common.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
source /usr/local/bin/compliance_check/scripts/kube-bench/helper1_6_0.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/common.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/kube-bench/helper1_6_0.sh
if [ -z "${NODE_TYPE}" ]
then
NODE_TYPE="master"
Expand Down
14 changes: 7 additions & 7 deletions scripts/nist.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
source /usr/local/bin/compliance_check/scripts/common.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/1_host_configuration.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/2_docker_daemon_configuration.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/3_docker_daemon_configuration_files.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/4_container_images.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/5_container_runtime.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/common.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/1_host_configuration.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/2_docker_daemon_configuration.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/3_docker_daemon_configuration_files.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/4_container_images.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/5_container_runtime.sh

check_1_2_2
check_1_1_18
Expand Down
6 changes: 3 additions & 3 deletions scripts/nistkube.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source /usr/local/bin/compliance_check/scripts/common.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
source /usr/local/bin/compliance_check/scripts/kube-bench/helper1_6_0.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/common.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/kube-bench/helper1_6_0.sh
if [ -z "${NODE_TYPE}" ]
then
NODE_TYPE="master"
Expand Down
14 changes: 7 additions & 7 deletions scripts/pci.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
source /usr/local/bin/compliance_check/scripts/common.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/1_host_configuration.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/2_docker_daemon_configuration.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/3_docker_daemon_configuration_files.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/4_container_images.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/tests/5_container_runtime.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/common.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/1_host_configuration.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/2_docker_daemon_configuration.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/3_docker_daemon_configuration_files.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/4_container_images.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/tests/5_container_runtime.sh

check_1_2_2
check_1_1_18
Expand Down
6 changes: 3 additions & 3 deletions scripts/pcikube.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source /usr/local/bin/compliance_check/scripts/common.sh
source /usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
source /usr/local/bin/compliance_check/scripts/kube-bench/helper1_6_0.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/common.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/docker-bench-security/functions/helper_lib.sh
source $DF_INSTALL_DIR/usr/local/bin/compliance_check/scripts/kube-bench/helper1_6_0.sh
if [ -z "${NODE_TYPE}" ]
then
NODE_TYPE="master"
Expand Down

0 comments on commit 29666c6

Please sign in to comment.