duo-labs / cloudmapper

CloudMapper helps you analyze your Amazon Web Services (AWS) environments.
BSD 3-Clause "New" or "Revised" License
6k stars 810 forks source link

find_admins KeyError #618

Open maestretti opened 4 years ago

maestretti commented 4 years ago
(cloudmapper) root@f9efb2165ca6:/opt/cloudmapper# python cloudmapper.py find_admins --account YOUR_ACCOUNT
Traceback (most recent call last):
  File "cloudmapper.py", line 72, in <module>
    main()
  File "cloudmapper.py", line 66, in main
    commands[command].run(arguments)
  File "/opt/cloudmapper/commands/find_admins.py", line 31, in run
    admins = find_admins(accounts, args, findings=set())
  File "/opt/cloudmapper/shared/iam_audit.py", line 147, in find_admins
    region, findings, privs_to_look_for, include_restricted
  File "/opt/cloudmapper/shared/iam_audit.py", line 276, in find_admins_in_account
    policy["Arn"],
KeyError: 'Arn'
0xdabbad00 commented 4 years ago

Looks like I need to change policy to policy_doc at https://github.com/duo-labs/cloudmapper/blob/1e60e1fb0bf5ad71d8514c2f5a3a2696b130f4cc/shared/iam_audit.py#L276

w0rmr1d3r commented 3 years ago

That line has changed to role["Arn"], does this issue make any sense now? @0xdabbad00 @maestretti