mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-04 18:44:24 +00:00
Fix checks with comma in fields that break csv @j2clerck
Fix checks with comma in fields that break csv @j2clerck
This commit is contained in:
+2
-2
@@ -42,9 +42,9 @@ check122(){
|
||||
textFail "$REGION: Policy $policy allows \"*:*\"" "$REGION" "$policy"
|
||||
done
|
||||
else
|
||||
textPass "$REGION: No custom policy found that allow full \"*:*\" administrative privileges" "$REGION" "$policy"
|
||||
textPass "$REGION: No custom policy found that allow full \"*:*\" administrative privileges" "$REGION"
|
||||
fi
|
||||
else
|
||||
textPass "$REGION: No custom policies found" "$REGION" "$policy"
|
||||
textPass "$REGION: No custom policies found" "$REGION"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ extra7149() {
|
||||
for redshiftcluster in $LIST_OF_REDSHIFT_CLUSTERS; do
|
||||
REDSHIFT_SNAPSHOT_ENABLED=$($AWSCLI redshift describe-cluster-snapshots $PROFILE_OPT --region $regx --cluster-identifier $redshiftcluster --snapshot-type automated)
|
||||
if [[ $REDSHIFT_SNAPSHOT_ENABLED ]]; then
|
||||
textPass "$regx: Redshift cluster $redshiftcluster has automated snapshots $REDSHIFT_SNAPSHOT_ENABLED" "$regx" "$redshiftcluster"
|
||||
textPass "$regx: Redshift cluster $redshiftcluster has automated snapshots." "$regx" "$redshiftcluster"
|
||||
else
|
||||
textFail "$regx: Redshift cluster $redshiftcluster has automated snapshots disabled!" "$regx" "$redshiftcluster"
|
||||
fi
|
||||
|
||||
@@ -30,7 +30,7 @@ CHECK_SEVERITY_extra7152="Medium"
|
||||
CHECK_ASFF_RESOURCE_TYPE_extra7152="AwsRoute53Domain"
|
||||
CHECK_ALTERNATE_check7152="extra7152"
|
||||
CHECK_SERVICENAME_extra7152="route53"
|
||||
CHECK_RISK_extra7152='Without privacy protection enabled, ones personal information is published to the public WHOIS database'
|
||||
CHECK_RISK_extra7152='Without privacy protection enabled; ones personal information is published to the public WHOIS database'
|
||||
CHECK_REMEDIATION_extra7152='Ensure default Privacy is enabled'
|
||||
CHECK_DOC_extra7152='https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-privacy-protection.html'
|
||||
CHECK_CAF_EPIC_extra7152='Data Protection'
|
||||
|
||||
@@ -27,7 +27,7 @@ CHECK_SEVERITY_extra7153="Medium"
|
||||
CHECK_ASFF_RESOURCE_TYPE_extra7153="AwsRoute53Domain"
|
||||
CHECK_ALTERNATE_check7153="extra7153"
|
||||
CHECK_SERVICENAME_extra7153="route53"
|
||||
CHECK_RISK_extra7153='Without transfer lock enabled, a domain name could be incorrectly moved to a new registrar'
|
||||
CHECK_RISK_extra7153='Without transfer lock enabled; a domain name could be incorrectly moved to a new registrar'
|
||||
CHECK_REMEDIATION_extra7153='Ensure transfer lock is enabled'
|
||||
CHECK_DOC_extra7153='https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-lock.html'
|
||||
CHECK_CAF_EPIC_extra7153='Data Protection'
|
||||
|
||||
@@ -37,9 +37,9 @@ extra7156(){
|
||||
for stagename in $CHECK_STAGES_NAME;do
|
||||
CHECK_STAGE_METHOD_LOGGING=$($AWSCLI apigatewayv2 get-stages $PROFILE_OPT --region $regx --api-id $apigwid --query "Items[?StageName == \`$stagename\` ].AccessLogSettings.DestinationArn" --output text)
|
||||
if [[ $CHECK_STAGE_METHOD_LOGGING ]];then
|
||||
textPass "$regx: API Gateway V2 $API_GW_NAME ID: $apigwid, stage: $stagename, has access logging enabled to $CHECK_STAGE_METHOD_LOGGING" "$regx" "$API_GW_NAME"
|
||||
textPass "$regx: API Gateway V2 $API_GW_NAME ID: $apigwid with stage: $stagename has access logging enabled to $CHECK_STAGE_METHOD_LOGGING" "$regx" "$API_GW_NAME"
|
||||
else
|
||||
textFail "$regx: API Gateway V2 $API_GW_NAME ID: $apigwid, stage: $stagename, has access logging disabled" "$regx" "$API_GW_NAME"
|
||||
textFail "$regx: API Gateway V2 $API_GW_NAME ID: $apigwid with stage: $stagename has access logging disabled" "$regx" "$API_GW_NAME"
|
||||
fi
|
||||
done
|
||||
else
|
||||
|
||||
@@ -18,7 +18,7 @@ CHECK_SEVERITY_extra7162="Medium"
|
||||
CHECK_ASFF_RESOURCE_TYPE_extra7162="AwsLogsLogGroup"
|
||||
CHECK_ALTERNATE_check7162="extra7162"
|
||||
CHECK_SERVICENAME_extra7162="cloudwatch"
|
||||
CHECK_RISK_extra7162='If log groups have a low retention policy of less than 365 days, crucial logs and data can be lost'
|
||||
CHECK_RISK_extra7162='If log groups have a low retention policy of less than 365 days; crucial logs and data can be lost'
|
||||
CHECK_REMEDIATION_extra7162='Add Log Retention policy of 365 days to log groups. This will persist logs and traces for a long time.'
|
||||
CHECK_DOC_extra7162='https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_Logs.html'
|
||||
CHECK_CAF_EPIC_extra7162='Data Retention'
|
||||
|
||||
@@ -47,7 +47,7 @@ extra726(){
|
||||
textInfo "$REGION: Trusted Advisor check $TA_CHECKS_NAME is in warning state $QUERY_TA_CHECK_RESULT" "$REGION" "$TA_CHECKS_NAME"
|
||||
;;
|
||||
"not_available")
|
||||
textInfo "$REGION: Trusted Advisor check $TA_CHECKS_NAME is in not_available state $QUERY_TA_CHECK_RESULT" "u$REGION" "$TA_CHECKS_NAME"
|
||||
textInfo "$REGION: Trusted Advisor check $TA_CHECKS_NAME is in not_available state $QUERY_TA_CHECK_RESULT" "$REGION" "$TA_CHECKS_NAME"
|
||||
;;
|
||||
"*")
|
||||
textFail "$REGION: Trusted Advisor check $TA_CHECKS_NAME is in unknown state $QUERY_TA_CHECK_RESULT" "$REGION" "$TA_CHECKS_NAME"
|
||||
|
||||
@@ -39,7 +39,7 @@ extra727(){
|
||||
if [[ $SQS_POLICY_ALLOW_ALL_WITHOUT_CONDITION ]]; then
|
||||
SQS_POLICY_ALLOW_ALL_WITHOUT_CONDITION_DETAILS=$(echo $SQS_POLICY_ALLOW_ALL_WITHOUT_CONDITION \
|
||||
| jq '"[Principal: " + (.Principal|tostring) + " Action: " + (.Action|tostring) + "]"' )
|
||||
textFail "$regx: SQS $queue queue policy with public access: $SQS_POLICY_ALLOW_ALL_WITHOUT_CONDITION_DETAILS" "$regx" "$queue"
|
||||
textFail "$regx: SQS $queue queue policy with public access" "$regx" "$queue"
|
||||
else
|
||||
textInfo "$regx: SQS $queue queue policy with public access but has a Condition" "$regx" "$queue"
|
||||
fi
|
||||
|
||||
@@ -39,7 +39,7 @@ extra731(){
|
||||
if [[ $SNS_POLICY_ALLOW_ALL_WITHOUT_CONDITION ]]; then
|
||||
SNS_POLICY_ALLOW_ALL_WITHOUT_CONDITION_DETAILS=$(echo $SNS_POLICY_ALLOW_ALL_WITHOUT_CONDITION \
|
||||
| jq '"[Principal: " + (.Principal|tostring) + " Action: " + (.Action|tostring) + "]"' )
|
||||
textFail "$regx: SNS topic $SHORT_TOPIC's policy with public access: $SNS_POLICY_ALLOW_ALL_WITHOUT_CONDITION_DETAILS" "$regx" "$SHORT_TOPIC"
|
||||
textFail "$regx: SNS topic $SHORT_TOPIC's policy with public access" "$regx" "$SHORT_TOPIC"
|
||||
else
|
||||
textPass "$regx: SNS topic $SHORT_TOPIC's policy with public access but has a Condition" "$regx" "$SHORT_TOPIC"
|
||||
fi
|
||||
|
||||
@@ -50,7 +50,7 @@ extra765(){
|
||||
textFail "$region: ECR repository $repo has scan on push disabled!" "$region" "$repo"
|
||||
;;
|
||||
"None")
|
||||
textInfo "$region: ECR repository $repo has no scanOnPush status, newer awscli needed" "$region" "$repo"
|
||||
textInfo "$region: ECR repository $repo has no scanOnPush status: newer awscli needed" "$region" "$repo"
|
||||
;;
|
||||
"*")
|
||||
textInfo "$region: ECR repository $repo has unknown scanOnPush status \"$SCAN_ENABLED\"" "$region" "$repo"
|
||||
|
||||
@@ -27,7 +27,7 @@ extra769(){
|
||||
for regx in $REGIONS; do
|
||||
LIST_OF_ACCESS_ANALYZERS=$($AWSCLI accessanalyzer list-analyzers $PROFILE_OPT --region $regx --query analyzers[*].arn --output text 2>&1)
|
||||
if [[ $(echo "$LIST_OF_ACCESS_ANALYZERS" | grep -i "argument command: Invalid choice") ]]; then
|
||||
textInfo "$regx: list-analyzers not supported, newer awscli needed" "$regx"
|
||||
textInfo "$regx: list-analyzers not supported: newer awscli needed" "$regx"
|
||||
continue
|
||||
fi
|
||||
if [[ $(echo "$LIST_OF_ACCESS_ANALYZERS" | grep -i "AccessDeniedException") ]]; then
|
||||
|
||||
@@ -35,7 +35,7 @@ extra794(){
|
||||
if [[ $(echo $TYPES | egrep "api.*audit.*authenticator.*controllerManager.*scheduler") ]]; then
|
||||
textPass "$regx: Control plane logging enabled and correctly configured for EKS cluster $CLUSTER" "$regx" "$CLUSTER"
|
||||
else
|
||||
textFail "$regx: Control plane logging enabled, but not all log types collected for EKS cluster $CLUSTER" "$regx" "$CLUSTER"
|
||||
textFail "$regx: Control plane logging enabled; not all log types collected for EKS cluster $CLUSTER" "$regx" "$CLUSTER"
|
||||
fi
|
||||
else
|
||||
textFail "$regx: Control plane logging is not enabled for EKS cluster $CLUSTER" "$regx" "$CLUSTER"
|
||||
|
||||
Reference in New Issue
Block a user