salesforce / salesforce/cloudsplaining

IAM Results mis-reporting role policies

Open
#154 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
2.2k
Forks
221
Avg merge
3h 21m
Merged PRs (30d)
8

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the report with Cloudsplaining v0.2.5, then compare the attached managed policies in default.json with the role data in iam-results-default.json. Trace how those documents feed the output report; done means an administrator role with AdministratorAccess is represented with its AWS-managed policy and reported as an issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript
Domain
authorization, cloud, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.