AWS Policy Simulation CLI — predict SCP, IAM, and RCP impact before deployment
Project description
sibyl — AWS Policy Simulation CLI
The Sibyls were oracles consulted before every major decision. sibyl does the same for your AWS policies.
Simulate SCP, IAM, and RCP policy changes against real CloudTrail data to predict what would break before deployment.
This tool is strictly read-only. It never creates, modifies, or deletes any AWS resources.
Install
pipx install sibyl-aws
Or with pip:
pip install sibyl-aws
Quick Start
# 1. Log in to AWS
aws sso login --profile your-profile
# 2. Discover your org structure (one-time)
sibyl init --profile your-profile
# 3. Simulate a policy
sibyl --ou dev_myapp --scp my-policy.json
Usage
Short form (recommended)
# Simulate an SCP
sibyl --ou dev_myapp --scp policy.json
# Simulate an RCP
sibyl --ou dev_myapp --rcp policy.json
# Dry-run: list all API calls without making them
sibyl --ou dev_myapp --scp policy.json --dry-run
# Save report as markdown
sibyl --ou dev_myapp --scp policy.json --output report.md
# Use a specific AWS profile
sibyl --ou dev_myapp --scp policy.json --profile my-profile
Full form
# Simulate an SCP against an OU by name
sibyl simulate --policy path/to/policy.json --type scp --target dev_myapp
# Simulate against all OUs where a policy is currently deployed
sibyl simulate --policy policy.json --type scp --target current
# Simulate an IAM policy for a specific role
sibyl simulate --policy policy.json --type iam --role-arn arn:aws:iam::123456789012:role/MyRole
# Simulate an RCP
sibyl simulate --policy policy.json --type rcp --target prod_myapp
# Extend lookback period (default: 7 days, max: 90)
sibyl simulate --policy policy.json --type scp --target dev_myapp --days 30
Other commands
# List available OUs and groups
sibyl list-targets
# Show SCPs attached to a target
sibyl show-policies --target dev_myapp
# Print the minimal IAM policy required by this tool
sibyl --show-permissions
Target Resolution
The --target / --ou option accepts:
| Format | Example | Description |
|---|---|---|
| OU key | dev_myapp |
Friendly name from organizational-units.yaml |
| OU group | all_dev |
Expands to all member OUs |
| OU ID | ou-xxxx-yyyyyyyy |
Raw AWS Organizations OU ID |
current |
— | OUs where the policy is currently deployed |
How It Works
- Load the proposed policy file (JSON or YAML)
- Resolve target OUs to their member AWS accounts
- Discover real API usage from CloudTrail (
LookupEvents, read-only) - Scan existing resources in each target account (policy-driven, read-only) — so that resources idle during the lookback window are still counted toward blast radius
- Fetch existing SCPs/RCPs attached to the targets (for delta comparison)
- Simulate the proposed deny statements against discovered actions locally
- Report which actions would be newly blocked, grouped by severity and principal
Resource discovery
Alongside CloudTrail, Sibyl enumerates the standing inventory for every AWS service the proposed policy denies. A bucket idle for 30 days won't appear in CloudTrail, but a Deny s3:DeleteBucket still threatens it. Resource counts appear in the HTML report under Resources in scope and are tied to each block's blast-radius estimate.
Covered services (36 resource types across 36 IAM prefixes):
Core compute & storage — ec2 (instances, volumes, VPCs), lambda, s3, iam, cloudformation, ecr, ecs, eks, elasticloadbalancing, apigateway, cloudfront, route53
Databases & caching — dynamodb, rds (instances + clusters, incl. Aurora/DocumentDB/Neptune), elasticache, memorydb, timestream
Analytics & data — athena, glue, redshift, es (OpenSearch), kinesis, kafka (MSK), elasticmapreduce (EMR)
ML / AI — sagemaker (endpoints + notebook instances), bedrock (custom models)
Messaging & integration — sqs, sns, secretsmanager, ssm, logs
Security & governance — acm, wafv2, guardduty, macie2, config, cloudtrail
Use --no-resource-scan to skip this phase.
Severity classification: HIGH = create/delete/modify, MEDIUM = put/start/invoke, LOW = read/list/describe. LOW does not mean low business impact — blocking read-only APIs can break consoles and AWS services.
Required AWS Permissions
All read-only. Get the exact policy JSON:
sibyl --show-permissions
cloudtrail:LookupEvents
organizations:ListRoots
organizations:ListChildren
organizations:DescribeOrganizationalUnit
organizations:ListAccountsForParent
organizations:ListPoliciesForTarget
organizations:DescribePolicy
organizations:DescribeOrganization
sts:GetCallerIdentity
Security & Transparency
See SECURITY.md for a full breakdown of:
- Every API call made per operation
- What is cached and where (
~/.cache/sibyl/) - What is NOT stored (credentials, IPs, session context)
- How to audit and remove all local data
Tests
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/ -v --cov=sibyl
CloudTrail regions
Events are queried in all supported regions. When simulating a policy that denies specific services, only events for those services are fetched (faster). Use --no-event-filter to fetch all events.
Caching
CloudTrail results are cached in ~/.cache/sibyl/ (daily rotation). Use --no-cache to force a fresh query. See SECURITY.md for details.
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 sibyl_aws-0.3.2.tar.gz.
File metadata
- Download URL: sibyl_aws-0.3.2.tar.gz
- Upload date:
- Size: 95.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
601f0f2e8f93e06213928ddfca12e0d27defc30af541fe4c910d92477ca5bd0a
|
|
| MD5 |
838c09f12ca7ddb06b77e87c3044f1e9
|
|
| BLAKE2b-256 |
d8881c507ebf52a740f28cc2730264b53c6bb44da615398702c9e31db168b14f
|
Provenance
The following attestation bundles were made for sibyl_aws-0.3.2.tar.gz:
Publisher:
publish.yml on radekpadrta/sibyl-aws
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sibyl_aws-0.3.2.tar.gz -
Subject digest:
601f0f2e8f93e06213928ddfca12e0d27defc30af541fe4c910d92477ca5bd0a - Sigstore transparency entry: 1674377495
- Sigstore integration time:
-
Permalink:
radekpadrta/sibyl-aws@111b3c3b1311eec1c5d6079c5147ff91f2fc7d87 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/radekpadrta
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@111b3c3b1311eec1c5d6079c5147ff91f2fc7d87 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sibyl_aws-0.3.2-py3-none-any.whl.
File metadata
- Download URL: sibyl_aws-0.3.2-py3-none-any.whl
- Upload date:
- Size: 76.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd3d83306c7e6e70bf8df0f75978cbebbe6ad66992bb3b584f0b3dcc5d091019
|
|
| MD5 |
bea942f9111ffe523317a60145560538
|
|
| BLAKE2b-256 |
92bcc56bda567f1c0ba8df9aa0e520b6ff9d42cc9c32f990778488abc3cb0891
|
Provenance
The following attestation bundles were made for sibyl_aws-0.3.2-py3-none-any.whl:
Publisher:
publish.yml on radekpadrta/sibyl-aws
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sibyl_aws-0.3.2-py3-none-any.whl -
Subject digest:
fd3d83306c7e6e70bf8df0f75978cbebbe6ad66992bb3b584f0b3dcc5d091019 - Sigstore transparency entry: 1674377513
- Sigstore integration time:
-
Permalink:
radekpadrta/sibyl-aws@111b3c3b1311eec1c5d6079c5147ff91f2fc7d87 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/radekpadrta
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@111b3c3b1311eec1c5d6079c5147ff91f2fc7d87 -
Trigger Event:
push
-
Statement type: