Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
x4v13r64 committed Oct 27, 2020
1 parent 0711031 commit a5fbd2a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ScoutSuite/providers/aws/resources/iam/credentialreports.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ async def _user_has_hardware_mfa_devices(self, username):
if username == '<root_account>':
devices = await self.facade.iam.get_virtual_mfa_devices()
for device in devices:
if device['User']['Arn'][-5:] == ':root':
# If no EnableDate the device has been disabled
if device.get('EnableDate') and device['User']['Arn'][-5:] == ':root':
return False
return True
else:
Expand Down

0 comments on commit a5fbd2a

Please sign in to comment.