cloudsplaining icon indicating copy to clipboard operation
cloudsplaining copied to clipboard

IAM Results mis-reporting role policies

Open nmarchini opened this issue 5 years ago • 1 comments

v0.2.5

I have run Cloudsplaining against an AWS account and the default.json contains one of the admin roles in the account. It shows that the following Attached Managed Policies are part of the Role.

"AttachedManagedPolicies": [
                {
                    "PolicyName": "AdministratorAccess",
                    "PolicyArn": "arn:aws:iam::aws:policy/AdministratorAccess"
                }
            ],

When I look at the iam-results-default.json document it shows the same role but reports that the role has no policies at all.

            "create_date": "2020-07-22 12:33:57+00:00",
            "role_last_used": "2021-01-21 10:43:07+00:00",
            "id": "XXXXXXXXXXXXXXXXXXXXX",
            "name": "XXXXXXXXX",
            "inline_policies": {},
            "instance_profiles": [],
            "instances_count": 0,
            "path": "/",
            "customer_managed_policies": {},
            "aws_managed_policies": {},
            "is_excluded": false

The result is that is shows in the output report as not being an issue even though is has full admin access to the account.

Screenshot 2021-01-26 at 22 34 21

nmarchini avatar Jan 27 '21 00:01 nmarchini

@nmarchini - I included AdministratorAccess in the default exclusions config because otherwise it would slow things down. https://github.com/salesforce/cloudsplaining/blob/master/cloudsplaining/shared/default-exclusions.yml#L7. I recognize that's a gap. If that speed compromise is okay with you, I suggest in the meantime using a custom exclusions file and removing AdministratorAccess fro the exclusions list.

@verkaufer - perhaps this is a good opportunity for the escape hatch that we discussed?

kmcquade avatar Feb 19 '21 21:02 kmcquade