Skip to content

feat: export all policies for an IAM principal - #976

Open
gt12889 wants to merge 1 commit into
duo-labs:mainfrom
gt12889:feat/iam-policy-export
Open

feat: export all policies for an IAM principal#976
gt12889 wants to merge 1 commit into
duo-labs:mainfrom
gt12889:feat/iam-policy-export

Conversation

@gt12889

@gt12889 gt12889 commented Sep 4, 2026

Copy link
Copy Markdown

Closes #500

Summary

  • Add the iam_policies command for a collected IAM user or role name/ARN.
  • Report inline policies, directly attached managed policies, and group-inherited policies.
  • Include policy source attribution and the current managed-policy document when collected.
  • Add a network-free unit test covering every policy source and unknown principals.

Usage

python cloudmapper.py iam_policies --accounts <account> --principal <name-or-arn>

Verification

  • python -m pytest -q tests/unit/test_iam_policies.py — 3 passed.
  • python -m compileall -q commands/iam_policies.py tests/unit/test_iam_policies.py — passed.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Have command to output all IAM policies for a principal

2 participants