Merge pull request #333 from gabrielsoltz/fix_check121

Review outputs, credentials never used are a FAIL now
This commit is contained in:
Toni de la Fuente
2019-06-06 15:58:20 -04:00
committed by GitHub

View File

@@ -22,7 +22,7 @@ check121(){
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
for user in $LIST_USERS_KEY1_ACTIVE; do
textInfo "$user has never used Access Key 1"
textFail "$user has never used Access Key 1"
done
else
textPass "No users found with Access Key 1 never used"
@@ -32,7 +32,7 @@ check121(){
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
for user in $LIST_USERS_KEY2_ACTIVE; do
textInfo "$user has never used Access Key 2"
textFail "$user has never used Access Key 2"
done
else
textPass "No users found with Access Key 2 never used"