mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-10 05:24:20 +00:00
Fix credentials
This commit is contained in:
1 parent
4f721cf243
commit
8393383830
2 files changed
+4
-4
No files matched your search
@@ -33,8 +33,8 @@ extra768(){
|
||||
TASK_DEFINITION_ENV_VARIABLES_FILE="$SECRETS_TEMP_FOLDER/extra768-$TASK_DEFINITION-$regx-variables.txt"
|
||||
TASK_DEFINITION_ENV_VARIABLES=$($AWSCLI ecs $PROFILE_OPT --region $regx describe-task-definition --task-definition $taskDefinition --query 'taskDefinition.containerDefinitions[*].environment' --output text > $TASK_DEFINITION_ENV_VARIABLES_FILE)
|
||||
if [ -s $TASK_DEFINITION_ENV_VARIABLES_FILE ];then
|
||||
# Implementation using https://github.com/Yelp/detect-secrets
|
||||
FINDINGS=$(secretsDetector file $TASK_DEFINITION_ENV_VARIABLES_FILE)
|
||||
# Implementation using https://github.com/Yelp/detect-secrets
|
||||
FINDINGS=$(secretsDetector file $TASK_DEFINITION_ENV_VARIABLES_FILE)
|
||||
if [[ $FINDINGS -eq 0 ]]; then
|
||||
textPass "$regx: No secrets found in ECS task definition $TASK_DEFINITION variables" "$regx"
|
||||
# delete file if nothing interesting is there
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
mkdir ~/.aws
|
||||
cat << AWS_CREDS > ~/.aws/credentials
|
||||
[default]
|
||||
[${ACCOUNT_ID}]
|
||||
credential_source = EcsContainer
|
||||
role_arn = ${ROLE_ARN}
|
||||
external_id = ${EXTERNAL_ID}
|
||||
@@ -10,7 +10,7 @@ external_id = ${EXTERNAL_ID}
|
||||
AWS_CREDS
|
||||
|
||||
echo "Running prowler on ${ACCOUNT_ID}"
|
||||
./prowler -p default "${CHECKS}" -M json > output.json
|
||||
./prowler -p "${ACCOUNT_ID}" "${CHECKS}" -M json > output.json
|
||||
|
||||
echo "Results:"
|
||||
cat output.json
|
||||
|
||||
Reference in new issue
Block a user