From 4f872fc2fffa9b6adea267a199929b0bd6cd5d44 Mon Sep 17 00:00:00 2001 From: Kishore Vinjam Date: Tue, 23 Apr 2024 14:11:41 -0400 Subject: [PATCH 1/5] ash test addition --- .../functional_tests/entrypoint.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.project_automation/functional_tests/entrypoint.sh b/.project_automation/functional_tests/entrypoint.sh index d83ecf6..d106d48 100755 --- a/.project_automation/functional_tests/entrypoint.sh +++ b/.project_automation/functional_tests/entrypoint.sh @@ -37,11 +37,11 @@ run_test() { acct_id=$(aws sts get-caller-identity --output text --query 'Account') # if account id is xxxx do this -if [ "$acct_id" == ${NON_CT_ENV} ]; then - run_test "launch-partner-solution-nonct" -else - run_test "launch-partner-solution" -fi +# if [ "$acct_id" == ${NON_CT_ENV} ]; then +# run_test "launch-partner-solution-nonct" +# else +# run_test "launch-partner-solution" +# fi # Run taskcat e2e test #run_test "launch-partner-solution" @@ -51,11 +51,11 @@ fi #find ${PROJECT_PATH} -name lambda.zip -exec rm -rf {} \; -#git clone https://github.com/aws-samples/automated-security-helper.git /tmp/ash +git clone https://github.com/aws-samples/automated-security-helper.git /tmp/ash # Set the repo path in your shell for easier access -#export PATH=$PATH:/tmp/ash +export PATH=$PATH:/tmp/ash -#ash --source-dir . -#cat aggregated_results.txt +ash --source-dir . +cat aggregated_results.txt From 8a07158a1126ae0089a5234a3291d6822920d2f5 Mon Sep 17 00:00:00 2001 From: Kishore Vinjam Date: Tue, 23 Apr 2024 22:10:47 -0400 Subject: [PATCH 2/5] update ash path --- .project_automation/functional_tests/entrypoint.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.project_automation/functional_tests/entrypoint.sh b/.project_automation/functional_tests/entrypoint.sh index d106d48..34f468d 100755 --- a/.project_automation/functional_tests/entrypoint.sh +++ b/.project_automation/functional_tests/entrypoint.sh @@ -51,11 +51,17 @@ acct_id=$(aws sts get-caller-identity --output text --query 'Account') #find ${PROJECT_PATH} -name lambda.zip -exec rm -rf {} \; +echo "Downloading the ASH tool" git clone https://github.com/aws-samples/automated-security-helper.git /tmp/ash # Set the repo path in your shell for easier access export PATH=$PATH:/tmp/ash +echo "Executing the ASH tool" ash --source-dir . -cat aggregated_results.txt +pwd +ls -lrt + +cat ${PROJECT_PATH}/ash_output/aggregated_results.txt +#cat aggregated_results.txt From 0c1c716af29c1a83172f8d7823ca36ba96c2d4b8 Mon Sep 17 00:00:00 2001 From: Tony Bulding <44652148+tbulding@users.noreply.github.com> Date: Wed, 24 Apr 2024 13:26:22 -0500 Subject: [PATCH 3/5] Update entrypoint.sh --- .project_automation/functional_tests/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.project_automation/functional_tests/entrypoint.sh b/.project_automation/functional_tests/entrypoint.sh index 34f468d..776fb27 100755 --- a/.project_automation/functional_tests/entrypoint.sh +++ b/.project_automation/functional_tests/entrypoint.sh @@ -2,7 +2,7 @@ ## NOTE: paths may differ when running in a managed task. To ensure behavior is consistent between -# managed and local tasks always use these variables for the project and project type path +# managed and local tasks always use these variables for the project and project type path. PROJECT_PATH=${BASE_PATH}/project PROJECT_TYPE_PATH=${BASE_PATH}/projecttype NON_CT_ENV="039084729647" From ea7b0b2ec1b4f948ea9ad4da128c7f92984c79a2 Mon Sep 17 00:00:00 2001 From: Tony Bulding <44652148+tbulding@users.noreply.github.com> Date: Thu, 25 Apr 2024 09:56:30 -0500 Subject: [PATCH 4/5] Update entrypoint.sh --- .project_automation/functional_tests/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.project_automation/functional_tests/entrypoint.sh b/.project_automation/functional_tests/entrypoint.sh index 776fb27..34f468d 100755 --- a/.project_automation/functional_tests/entrypoint.sh +++ b/.project_automation/functional_tests/entrypoint.sh @@ -2,7 +2,7 @@ ## NOTE: paths may differ when running in a managed task. To ensure behavior is consistent between -# managed and local tasks always use these variables for the project and project type path. +# managed and local tasks always use these variables for the project and project type path PROJECT_PATH=${BASE_PATH}/project PROJECT_TYPE_PATH=${BASE_PATH}/projecttype NON_CT_ENV="039084729647" From 155154ec8ea6645b6baf1a48763d6c0238107831 Mon Sep 17 00:00:00 2001 From: Kishore Vinjam Date: Tue, 7 May 2024 13:19:22 -0400 Subject: [PATCH 5/5] ASH tool testing recheckin --- .../functional_tests/entrypoint.sh | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.project_automation/functional_tests/entrypoint.sh b/.project_automation/functional_tests/entrypoint.sh index 34f468d..c2d274e 100755 --- a/.project_automation/functional_tests/entrypoint.sh +++ b/.project_automation/functional_tests/entrypoint.sh @@ -34,34 +34,34 @@ run_test() { .project_automation/functional_tests/scoutsuite/scoutsuite.sh } -acct_id=$(aws sts get-caller-identity --output text --query 'Account') +run_ash_tests() { + echo "Downloading the ASH tool" + git clone https://github.com/aws-samples/automated-security-helper.git /tmp/ash -# if account id is xxxx do this -# if [ "$acct_id" == ${NON_CT_ENV} ]; then -# run_test "launch-partner-solution-nonct" -# else -# run_test "launch-partner-solution" -# fi -# Run taskcat e2e test -#run_test "launch-partner-solution" + # Set the repo path in your shell for easier access + export PATH=$PATH:/tmp/ash -#run_test "launch-partner-solution-nonct" + echo "Executing the ASH tool" + ash --source-dir . + pwd + ls -lrt -## Executing ash tool + cat ${PROJECT_PATH}/ash_output/aggregated_results.txt +} -#find ${PROJECT_PATH} -name lambda.zip -exec rm -rf {} \; +run_ash_tests -echo "Downloading the ASH tool" -git clone https://github.com/aws-samples/automated-security-helper.git /tmp/ash +acct_id=$(aws sts get-caller-identity --output text --query 'Account') -# Set the repo path in your shell for easier access -export PATH=$PATH:/tmp/ash +if account id is xxxx do this +if [ "$acct_id" == ${NON_CT_ENV} ]; then + run_test "launch-partner-solution-nonct" +else + run_test "launch-partner-solution" +fi +# Run taskcat e2e test +run_test "launch-partner-solution" -echo "Executing the ASH tool" -ash --source-dir . -pwd -ls -lrt +run_test "launch-partner-solution-nonct" -cat ${PROJECT_PATH}/ash_output/aggregated_results.txt -#cat aggregated_results.txt