aws-access-analyzer-validator
A tool to validate existing identity and resource policies across regions and supported AWS services with AWS IAM Access Analyzer.
This tool
- discovers resource and identity policies attached to resources of supported AWS services (see below) in all commercial regions
- validates these policies with AWS IAM Access Analyzer ValidatePolicy API
- generates a report with Access Analyzer findings
See examples/sample_report.md for an example.
Usage
- Install from PyPI (Python 3.10+ required):
pip install aws-access-analyzer-validator
- Execute the tool:
aws-access-analyzer-validator -o report.md
- Open
report.mdto see analysis results.
Arguments
aws-access-analyzer-validator supports the following arguments:
-
--regions- A comma separated list of regions to limit policy validation to. For example,--regions eu-west-1,eu-north-1limits validation to policies ineu-west-1andeu-north-1regions. Global resources (IAM, S3) are scanned regardless of region limitations. -
--excluded-regions- A comma separated list of regions to exclude from policy validation. For example,--regions eu-west-1,eu-north-1excludes resources ineu-west-1andeu-north-1regions from policy validation. Default:me-south-1to skil a defunct region by default.
Supported Services / Resources
aws-access-analyzer-validator validates policies from the following
services:
- AWS Identity and Access Management (IAM)
- Inline policies of IAM users
- Inline policies of IAM groups
- Inline policies and trust policy of IAM roles
- Managed IAM Policies (customer managed)
- Amazon S3 bucket policies
- Amazon SQS queue policies
- Amazon SNS topic policies
- Amazon Elastic Container Registry (ECR) repository policies
Required Permissions
This tool requires the following permissions to operate:
accessanalyzer:ValidatePolicyecr:DescribeRepositoriesecr:GetRepositoryPolicyiam:GetAccountAuthorizationDetailss3:GetBucketPolicys3:ListAllMyBucketssns:GetTopicAttributessns:ListTopicssqs:GetQueueAttributessqs:ListQueues
Here's an IAM policy that grants the required privileges:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PermissionsForAAValidator",
"Effect": "Allow",
"Action": [
"access-analyzer:ValidatePolicy",
"ecr:DescribeRepositories",
"ecr:GetRepositoryPolicy",
"iam:GetAccountAuthorizationDetails",
"s3:GetBucketPolicy",
"s3:ListAllMyBuckets",
"sns:GetTopicAttributes",
"sns:ListTopics",
"sqs:GetQueueAttributes",
"sqs:ListQueues"
],
"Resource": "*"
}
]
}
Development
Requires Python and uv. Useful commands:
# Run integration tests (requires admin-level AWS credentials)
make test
# Run linters
make -k lint
# Format code
make format
# Deploy test resources (requires AWS CLI and admin level AWS credentials)
make deploy-test-resources
# Delete test resources
make delete-test-resources
Credits
- Inspired by z0ph/aa-policy-validator.
License
MIT.
Metadata
Release files for aws-access-analyzer-validator 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aws_access_analyzer_validator-0.6.0.tar.gz | 6.6 kB | Without provenance | Details for aws_access_analyzer_validator-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aws_access_analyzer_validator-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for aws_access_analyzer_validator-0.6.0-py3-none-any.whl |
Total release size: 14.4 kB
Release files / aws_access_analyzer_validator-0.6.0.tar.gz
| Download URL | aws_access_analyzer_validator-0.6.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c82477d17ba88e0bfae1cf3c6509712d7e06236e310bb31b5033f58729381494
|
|
BLAKE2b-256 checksum How to use checksums |
404d12bed74f832653cff121e48f4b1f11eaaca7da38592b014280b08241d583
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / aws_access_analyzer_validator-0.6.0-py3-none-any.whl
| Download URL | aws_access_analyzer_validator-0.6.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b9cfc3095e26bb3eed35c6a8a52baa4ccace8c1c4a3f592d69ac5b4e36c3d2f9
|
|
BLAKE2b-256 checksum How to use checksums |
425d4516fe4928b265c05541d6f391052a840c4e96b10fe9f1d616a61c0d5995
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for aws-access-analyzer-validator 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.