Skip to content

Commit

Permalink
fix duo-labs#671 by handling kms exceptions on collect
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkrug committed Mar 2, 2020
1 parent 79a7d52 commit fe96652
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions commands/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,18 @@ def call_function(outputfile, handler, method_to_call, parameters, check, summar
and call_summary["action"] == "list_key_policies"
):
print(" - Denied, which should mean this KMS has restricted access")
elif (
"AccessDeniedException" in str(e)
and call_summary["service"] == "kms"
and call_summary["action"] == "list_grants"
):
print(" - Denied, which should mean this KMS has restricted access")
elif (
"AccessDeniedException" in str(e)
and call_summary["service"] == "kms"
and call_summary["action"] == "get_key_policy"
):
print(" - Denied, which should mean this KMS has restricted access")
elif (
"AccessDeniedException" in str(e)
and call_summary["service"] == "kms"
Expand Down

0 comments on commit fe96652

Please sign in to comment.