mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-05 11:14:16 +00:00
check root account access login and fail if used in the last day
This commit is contained in:
+2
-1
@@ -21,8 +21,9 @@ check11(){
|
||||
arn=$(cat $TEMP_REPORT_FILE|awk -F, '{ print $1,$2 }' |grep '<root_account>' | awk '{ print $2 }')
|
||||
days_not_in_use=$(how_many_days_from_today ${last_login_date%T*})
|
||||
|
||||
textInfo "Root account last accessed (password key_1 key_2): $last_login_date"
|
||||
if [ "$days_not_in_use" -gt "$MAX_DAYS" ];then
|
||||
textFail "Root Account $arn last accessed was less then ${MAX_DAYS#-} days ago"
|
||||
else
|
||||
textPass "Root Account $arn last accessed was more then ${MAX_DAYS#-} days ago"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user