mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 14:55:00 +00:00
committed by
GitHub
parent
e9ed339610
commit
c7925b6f94
4
prowler
4
prowler
@@ -513,7 +513,7 @@ check14(){
|
||||
# textWarn "Users with access key 1 older than 90 days:"
|
||||
for user in $LIST_OF_USERS_WITH_ACCESS_KEY1; do
|
||||
# check access key 1
|
||||
DATEROTATED1=$(cat $TEMP_REPORT_FILE | grep $user| awk -F, '{ print $10 }' | grep -v "N/A" | awk -F"T" '{ print $1 }')
|
||||
DATEROTATED1=$(cat $TEMP_REPORT_FILE | grep -v user_creation_time | grep $user| awk -F, '{ print $10 }' | grep -v "N/A" | awk -F"T" '{ print $1 }')
|
||||
HOWOLDER=$(how_older_from_today $DATEROTATED1)
|
||||
|
||||
if [ $HOWOLDER -gt "90" ];then
|
||||
@@ -532,7 +532,7 @@ check14(){
|
||||
# textWarn "Users with access key 2 older than 90 days:"
|
||||
for user in $LIST_OF_USERS_WITH_ACCESS_KEY2; do
|
||||
# check access key 2
|
||||
DATEROTATED2=$(cat $TEMP_REPORT_FILE | grep $user| awk -F, '{ print $10 }' | grep -v "N/A" | awk -F"T" '{ print $1 }')
|
||||
DATEROTATED2=$(cat $TEMP_REPORT_FILE | grep -v user_creation_time | grep $user| awk -F, '{ print $10 }' | grep -v "N/A" | awk -F"T" '{ print $1 }')
|
||||
HOWOLDER=$(how_older_from_today $DATEROTATED2)
|
||||
if [ $HOWOLDER -gt "90" ];then
|
||||
textWarn " $user has not rotated access key2. "
|
||||
|
||||
Reference in New Issue
Block a user