mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-11 07:15:15 +00:00
clean up CSV output for 1.23 when multiple users match
This commit is contained in:
10
prowler
10
prowler
@@ -755,8 +755,9 @@ check123(){
|
|||||||
LIST_USERS_KEY1_NA=$(for user in $LIST_USERS; do grep $user $TEMP_REPORT_FILE|awk -F, '{ print $1,$11 }'|grep N/A |awk '{ print $1 }'; done)
|
LIST_USERS_KEY1_NA=$(for user in $LIST_USERS; do grep $user $TEMP_REPORT_FILE|awk -F, '{ print $1,$11 }'|grep N/A |awk '{ print $1 }'; done)
|
||||||
LIST_USERS_KEY1_ACTIVE=$(for user in $LIST_USERS_KEY1_NA; do grep $user $TEMP_REPORT_FILE|awk -F, '{ print $1,$9 }'|grep "true$"|awk '{ print $1 }'|sed 's/[:blank:]+/,/g' ; done)
|
LIST_USERS_KEY1_ACTIVE=$(for user in $LIST_USERS_KEY1_NA; do grep $user $TEMP_REPORT_FILE|awk -F, '{ print $1,$9 }'|grep "true$"|awk '{ print $1 }'|sed 's/[:blank:]+/,/g' ; done)
|
||||||
if [[ $LIST_USERS_KEY1_ACTIVE ]]; then
|
if [[ $LIST_USERS_KEY1_ACTIVE ]]; then
|
||||||
# textNotice "List of users with Access Key 1 never used:"
|
for user in $LIST_USERS_KEY1_ACTIVE; do
|
||||||
textNotice "Users who never used Access Key 1: $LIST_USERS_KEY1_ACTIVE"
|
textNotice "$user has never used Access Key 1"
|
||||||
|
done
|
||||||
else
|
else
|
||||||
textOK "No users found with Access Key 1 never used"
|
textOK "No users found with Access Key 1 never used"
|
||||||
fi
|
fi
|
||||||
@@ -764,8 +765,9 @@ check123(){
|
|||||||
LIST_USERS_KEY2_NA=$(for user in $LIST_USERS; do grep $user $TEMP_REPORT_FILE|awk -F, '{ print $1,$16 }'|grep N/A |awk '{ print $1 }' ; done)
|
LIST_USERS_KEY2_NA=$(for user in $LIST_USERS; do grep $user $TEMP_REPORT_FILE|awk -F, '{ print $1,$16 }'|grep N/A |awk '{ print $1 }' ; done)
|
||||||
LIST_USERS_KEY2_ACTIVE=$(for user in $LIST_USERS_KEY2_NA; do grep $user $TEMP_REPORT_FILE|awk -F, '{ print $1,$14 }'|grep "true$" |awk '{ print $1 }' ; done)
|
LIST_USERS_KEY2_ACTIVE=$(for user in $LIST_USERS_KEY2_NA; do grep $user $TEMP_REPORT_FILE|awk -F, '{ print $1,$14 }'|grep "true$" |awk '{ print $1 }' ; done)
|
||||||
if [[ $LIST_USERS_KEY2_ACTIVE ]]; then
|
if [[ $LIST_USERS_KEY2_ACTIVE ]]; then
|
||||||
# textNotice "List of users with Access Key 2 never used:"
|
for user in $LIST_USERS_KEY2_ACTIVE; do
|
||||||
textNotice "Users who never used Access Key 2: $LIST_USERS_KEY2_ACTIVE"
|
textNotice "$user has never used Access Key 2"
|
||||||
|
done
|
||||||
else
|
else
|
||||||
textOK "No users found with Access Key 2 never used"
|
textOK "No users found with Access Key 2 never used"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user