AWS IAM Role/Policy permission viewer — see what a role or policy can do
Project description
catrole
catrole is a python pip package which let's you:
AWS IAM Role/Policy permission viewer — see what a role or policy can do.
Architectural Diagram
Requirements
- Python >= 3.11
- AWS credentials configured (via
~/.aws/credentials, environment variables, or SSO) - A cross-account IAM role you can assume in target account(s)
Installation
From source (local)
git clone https://github.com/RajChowdhury240/catrole.git
cd cat-role
pip3 install .
For development (editable install):
pip3 install -e .
From PyPI (remote)
pip3 install catrole
Usage
catrole uses -R to specify an IAM role to assume in the target account.
If -R is not provided, catrole reads the role name from ~/.catrole.
Setting a default assume role
echo "readonly-role" > ~/.catrole
Once set, you can omit -R from all commands:
where -a is account and -r is target role you're scanning for
catrole -a 123456789012 -r MyAppRole
-R on the command line always takes precedence over ~/.catrole.
Scan a role
-R is the assume role you're using to switch to another account , -a is account and -r is target role you're scanning for
catrole -R readonly-role -a 123456789012 -r AppRole
Scan a policy
catrole -R readonly-role -a 123456789012 -p Policy
Scan by ARN
- -A is ARN Mode*
catrole -R readonly-role -A arn:aws:iam::123456789012:role/AppRole
Search across all org accounts
- -s is search mode*
catrole -R readonly-role -s '*lambda*'
Search within a single account
catrole -R readonly-role -s '*admin*' -a 123456789012
Find roles by IAM action
Search across all org accounts for roles that can perform a specific action:
- -f is action search mode*
catrole -R readonly-role -f 's3:CreateBucket'
Use wildcards to find broader action patterns:
catrole -R readonly-role -f 's3:*' -a 123456789012
catrole -R readonly-role -f '*lambda*'
Results are printed as a table and automatically saved to a CSV file.
Run catrole -h for full help.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file catrole-0.2.1.tar.gz.
File metadata
- Download URL: catrole-0.2.1.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecd90f1df63b1e2443397bb819a21d01e1060e2d2b2ac46d2979de1bc81f5f8b
|
|
| MD5 |
bf3ebaed7f4089dcb185db9749ce2ddf
|
|
| BLAKE2b-256 |
fb65a7b14b4d6efc17fa58c66995113c0a18c106cf056a13a10b89642c4b5574
|
File details
Details for the file catrole-0.2.1-py3-none-any.whl.
File metadata
- Download URL: catrole-0.2.1-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0171aa36c71fdcf91b96019ba9f306923f3a3825c23ccfcaac1c19599146928e
|
|
| MD5 |
c0e7265cec8a849b0727a9b89afeb2a1
|
|
| BLAKE2b-256 |
44ce398c341338225e7f1bbfc1e0352a04c766ab697f737653237345412f7ac3
|