mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-11 23:35:07 +00:00
Merge branch 'master' into master
This commit is contained in:
@@ -19,7 +19,7 @@ CHECK_ALTERNATE_check102="check12"
|
||||
check12(){
|
||||
# "Ensure multi-factor authentication (MFA) is enabled for all IAM users that have a console password (Scored)"
|
||||
# List users with password enabled
|
||||
COMMAND12_LIST_USERS_WITH_PASSWORD_ENABLED=$(cat $TEMP_REPORT_FILE|awk -F, '{ print $1,$4 }' |grep -F ' true$' | awk '{ print $1 }')
|
||||
COMMAND12_LIST_USERS_WITH_PASSWORD_ENABLED=$(cat $TEMP_REPORT_FILE|awk -F, '{ print $1,$4 }' |grep 'true$' | awk '{ print $1 }')
|
||||
COMMAND12=$(
|
||||
for i in $COMMAND12_LIST_USERS_WITH_PASSWORD_ENABLED; do
|
||||
cat $TEMP_REPORT_FILE|awk -F, '{ print $1,$8 }' |grep "^$i " |grep false | awk '{ print $1 }'
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
|
||||
CHECK_ID_extra7100="7.100"
|
||||
CHECK_TITLE_extra7100="[extra7100] Ensure that no custom policies exist which allow permissive role assumption (e.g. sts:AssumeRole on *)"
|
||||
CHECK_SCORED_extra7100="NOT_SCORED"
|
||||
@@ -72,4 +73,4 @@ extra7100(){
|
||||
else
|
||||
textPass "No custom policies found"
|
||||
fi
|
||||
}
|
||||
}
|
||||
33
checks/check_extra799
Normal file
33
checks/check_extra799
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software distributed
|
||||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
|
||||
CHECK_ID_extra799="7.99"
|
||||
CHECK_TITLE_extra799="[extra799] Check if Security Hub is enabled and its standard subscriptions"
|
||||
CHECK_SCORED_extra799="NOT_SCORED"
|
||||
CHECK_TYPE_extra799="EXTRA"
|
||||
CHECK_ASFF_RESOURCE_TYPE_extra799="AwsSecurityHubHub"
|
||||
CHECK_ALTERNATE_check799="extra799"
|
||||
CHECK_SEVERITY_extra799="medium"
|
||||
|
||||
extra799(){
|
||||
for regx in $REGIONS; do
|
||||
# If command below fails get nothing then it there are no subscriptions and Security Hub is not enabled.
|
||||
LIST_OF_SECHUB_SUBSCRIPTIONS=$($AWSCLI $PROFILE_OPT --region $regx securityhub get-enabled-standards --query 'StandardsSubscriptions[?StandardsStatus == `READY`].StandardsSubscriptionArn' --output json 2>/dev/null | awk -F "/" '{ print $2 }' | tr '\n' ' ' )
|
||||
if [[ $LIST_OF_SECHUB_SUBSCRIPTIONS ]]; then
|
||||
textPass "$regx: Security Hub is enabled with standards $LIST_OF_SECHUB_SUBSCRIPTIONS" "$regx"
|
||||
else
|
||||
textInfo "$regx: Security Hub is not enabled" "$regx"
|
||||
#textFail "$regx: Security Hub is not enabled" "$regx"
|
||||
fi
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user