mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-18 17:34:17 +00:00
fix(instance-metadata): Credentials recovering (#1207)
* fix(instance-metadata): Credentials recovering * fix(expr): Dockerfile to root and expr in SESSION_TIME_REMAINING. Co-authored-by: Pepe Fagoaga <pepe@verica.io> Co-authored-by: sergargar <sergio@verica.io>
This commit is contained in:
8 files changed
+46
-23
No files matched your search
@@ -21,7 +21,7 @@ execute_check() {
|
||||
# Following logic looks for time remaining in the session and review it
|
||||
# if it is less than 600 seconds, 10 minutes.
|
||||
CURRENT_TIMESTAMP=$(date -u "+%s")
|
||||
SESSION_TIME_REMAINING=$(("${AWS_SESSION_EXPIRATION}" - "${CURRENT_TIMESTAMP}"))
|
||||
SESSION_TIME_REMAINING=$(expr "${AWS_SESSION_EXPIRATION}" - "${CURRENT_TIMESTAMP}")
|
||||
MINIMUM_REMAINING_TIME_ALLOWED=600
|
||||
if (( "${MINIMUM_REMAINING_TIME_ALLOWED}" > "${SESSION_TIME_REMAINING}" )); then
|
||||
# echo LESS THAN 10 MIN LEFT: RE-ASSUMING...
|
||||
|
||||
Reference in new issue
Block a user