mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 21:11:53 +00:00
fix(iam): handle KeyError in service_last_accessed (#3555)
This commit is contained in:
committed by
Pepe Fagoaga
parent
d06ccb9af1
commit
180864dab4
@@ -796,9 +796,9 @@ class IAM(AWSService):
|
||||
response = self.client.get_service_last_accessed_details(
|
||||
JobId=details["JobId"]
|
||||
)
|
||||
self.last_accessed_services[(user.name, user.arn)] = response[
|
||||
"ServicesLastAccessed"
|
||||
]
|
||||
self.last_accessed_services[(user.name, user.arn)] = response.get(
|
||||
"ServicesLastAccessed", {}
|
||||
)
|
||||
|
||||
except ClientError as error:
|
||||
if error.response["Error"]["Code"] == "NoSuchEntity":
|
||||
|
||||
Reference in New Issue
Block a user