From c7ac59728f35dbd09dd0fd7f8b4d52eceda424c7 Mon Sep 17 00:00:00 2001 From: based Date: Wed, 28 Feb 2024 10:37:47 +1000 Subject: [PATCH] did it again oops --- AWS.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/AWS.py b/AWS.py index e66b5a5..a62651f 100644 --- a/AWS.py +++ b/AWS.py @@ -95,9 +95,10 @@ def get_key_policies(iam_client, key: APIKey): policies = iam_client.list_attached_user_policies(UserName=key.username)['AttachedPolicies'] if policies is not None: if any("AWSCompromisedKeyQuarantine" in policy["PolicyName"] for policy in policies): - key.useless = True - key.useless_reasons.append('Quarantined Key') - return + if not key.bedrock_enabled: + key.useless = True + key.useless_reasons.append('Quarantined Key') + return if any("AdministratorAccess" in policy["PolicyName"] for policy in policies): key.admin_priv = True