You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note the Network Visualization functionality (command prepare) is no longer maintained.
Please mention the following:
What command was run? -> python cloudmapper.py audit
Are you working out of a virtualenv environment, Docker, or something else? -> virtualenv
Which branch? -> main
Exception was:
Exception:
unconverted data remains: Z
Traceback (most recent call last):
File "/tmp/airflow/cloudmapper/shared/audit.py", line 1195, in audit
audit_users(findings, region)
File "/tmp/airflow/cloudmapper/shared/audit.py", line 409, in audit_users
user_age = days_between(collection_date, user["user_creation_time"])
File "/tmp/airflow/cloudmapper/shared/common.py", line 348, in days_between
d2 = iso_date(s2)
File "/tmp/airflow/cloudmapper/shared/common.py", line 342, in iso_date
return datetime.datetime.strptime(d.split("+")[0], time_format)
File "/usr/local/lib/python3.9/_strptime.py", line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "/usr/local/lib/python3.9/_strptime.py", line 352, in _strptime
raise ValueError("unconverted data remains: %s" %
ValueError: unconverted data remains: Z
The reason seems to be that these commands
aws iam generate-credential-report
aws iam get-credential-report
def iso_date(d):
"""Convert ISO format date string such as 2018-04-08T23:33:20+00:00"""
time_format = "%Y-%m-%dT%H:%M:%S"
- return datetime.datetime.strptime(d.split("+")[0], time_format)+ return datetime.datetime.strptime(d.replace('Z', '').split("+")[0], time_format)
Probably a better fix would be to just consider dates won't have the +00:00 now, but didn't know if this was used somewhere else.
Note the Network Visualization functionality (command
prepare
) is no longer maintained.Please mention the following:
What command was run? ->
python cloudmapper.py audit
Are you working out of a virtualenv environment, Docker, or something else? ->
virtualenv
Which branch? ->
main
Exception was:
The reason seems to be that these commands
return data which have timestamps which end with
Z
instead of+00:00
- which are both valid values. And https://github.com/duo-labs/cloudmapper/blob/main/shared/common.py#L342 assumes that it ends with+00:00
.The text was updated successfully, but these errors were encountered: