mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 14:55:00 +00:00
Update prowler
Adapted execute_check to renew creds
This commit is contained in:
committed by
GitHub
parent
5c620949f0
commit
8c19583ac7
6
prowler
6
prowler
@@ -321,10 +321,10 @@ show_group_title() {
|
||||
# Function to execute the check
|
||||
execute_check() {
|
||||
if [[ $ACCOUNT_TO_ASSUME ]]; then
|
||||
MINIMUM_REMAINING_TIME_ALLOWED=$(( SESSION_DURATION_TO_ASSUME / 10 ))
|
||||
MINIMUM_REMAINING_TIME_ALLOWED=$(($SESSION_DURATION_TO_ASSUME / 10 ))
|
||||
CURRENT_TIMESTAMP=$(date -u "+%s")
|
||||
SESSION_CUTOFF=$(( CURRENT_TIMESTAMP + MINIMUM_REMAINING_TIME_ALLOWED ))
|
||||
if (( AWS_SESSION_EXPIRATION < SESSION_CUTOFF )); then
|
||||
SESSION_CUTOFF=$(($CURRENT_TIMESTAMP + $MINIMUM_REMAINING_TIME_ALLOWED))
|
||||
if [[ $AWS_SESSION_EXPIRATION < $SESSION_CUTOFF ]]; then
|
||||
unset AWS_ACCESS_KEY_ID
|
||||
unset AWS_SECRET_ACCESS_KEY
|
||||
unset AWS_SESSION_TOKEN
|
||||
|
||||
Reference in New Issue
Block a user