This release is a pre-release and may not be stable for production use.
CloudLedger
Multi-account AWS security scanning and infrastructure ledger with an MCP server for querying scan history.
Status: pre-release. CloudLedger is under active development and is not yet published to PyPI. The commands below describe the intended 0.1.0 release; expect gaps until then.
Overview
CloudLedger performs security assessments and collects detailed infrastructure information across multiple AWS accounts, building a historical ledger of every scan. It integrates Prowler for automated security checks against CIS Benchmarks, PCI-DSS, GDPR, HIPAA, and other frameworks, and exposes the collected data through a Model Context Protocol (MCP) stdio server so it can be queried in natural language from Claude Desktop, Claude Code, or any other MCP client.
Features
Scanner
- Security assessment: Prowler integration for framework-based automated checks, plus built-in exposure, identity, and network assessments
- Service inventory: identification of all AWS services in use across all regions
- Network architecture: VPC configurations including subnets, route tables, internet gateways, NAT gateways
- Compute, storage, and identity: EC2, load balancers, Auto Scaling groups, S3 buckets with public-exposure analysis, IAM users, roles, and policies
- DNS: Route53 hosted zones and record sets
- Scan tagging: tag scans at scan time or retrospectively, and search the ledger by tag from the CLI or the MCP tools
- AWS Organisation awareness: interactive scans capture organisation membership and the managing (control-tower) account, offer to scan the management account if the ledger has no record of it, and link member accounts to their management account
- Historical ledger: every scan is stored with timestamps for comparison and drift analysis
Storage
- SQLite out of the box (default location in the platform data directory, managed by konfig), or
- PostgreSQL, MySQL, or MSSQL via optional extras, configured once with
cloudledger setup; connection credentials are stored securely in the operating system keyring
MCP server
- Security queries: publicly accessible S3 buckets, EC2 instances with public IPs, overly permissive security groups
- Network queries: locate accounts containing specific IP addresses or CIDR ranges, map VPC architectures
- Configuration queries: compare configurations between scan dates, track drift
- Tag and organisation queries: search scans by tag, list tags, resolve organisation relationships
Requirements
- uv (manages Python and all dependencies)
- Python 3.12 (uv installs it on demand, but you must request it with
--python 3.12; 3.13+ is not supported because Prowler pins numpy 2.0.2) - AWS credentials (temporary session tokens recommended)
- Internet connectivity for AWS API access
Installation
The distribution is named cognisn-cloudledger; the installed command is cloudledger.
Always pass --python 3.12 when installing from PyPI: uv otherwise resolves against its
default (newest) Python, and the numpy 2.0.2 pin inherited from Prowler does not support
3.13+, so the install fails.
From PyPI:
# Run ad hoc without installing
uvx --python 3.12 --from cognisn-cloudledger cloudledger --help
# Or install as a tool
uv tool install --python 3.12 cognisn-cloudledger
# With a server database backend
uv tool install --python 3.12 "cognisn-cloudledger[postgres]" # or [mysql], [mssql], [all-db]
From source:
git clone https://github.com/Cognisn/cloudledger.git
cd cloudledger
uv sync
Quick start
# One-off configuration: choose SQLite or a server backend
cloudledger setup
# Interactive scan of a single account (database defaults to the
# platform data directory; override with --database)
cloudledger scan --tag client-acme --tag q3-review
# Batch scanning from CSV
cloudledger create-example-csv --output accounts.csv
cloudledger scan --csv accounts.csv
# Work with tags
cloudledger tag list
cloudledger tag find client-acme
cloudledger tag add <scan-id> follow-up
# Package the bundled MCP-client skills as ZIP archives, one per skill,
# ready to upload to your client's skill installer (see skills/README.md)
cloudledger skills export
# Start the MCP server (stdio); reads the configured database by default
cloudledger-mcp
When running from a source checkout, prefix commands with uv run.
Querying via MCP
With the MCP server connected to an MCP client, the ledger answers natural-language questions such as:
- "Show me all publicly accessible S3 buckets"
- "Find EC2 instances with public IP addresses in us-east-1"
- "List all scans tagged client-acme"
- "Which accounts belong to the organisation managed by account 123456789012?"
- "Compare resource counts between the two most recent scans of this account"
Security considerations
- Designed for temporary credentials; no long-term credentials are stored
- Read-only AWS API access
- Database passwords are held in the operating system keyring, never in plain-text configuration
- CSV files containing credentials should be stored with restricted permissions, deleted after use, and never committed to version control
This tool is designed for authorised security assessments only. Ensure you have proper authorisation before scanning AWS accounts.
Development
uv sync
uv run pytest # SQLite-backed tests
uv run pytest -m db # opt-in backend integration tests (run `docker compose up -d` first to start the postgres/mysql/mssql containers)
Contributions should use Australian English in comments and documentation, include unit tests for new features, and keep CHANGELOG.md current under the Unreleased heading.
Licence
MIT Licence. See LICENSE for details.
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 cognisn_cloudledger-0.1.0a2.tar.gz.
File metadata
- Download URL: cognisn_cloudledger-0.1.0a2.tar.gz
- Upload date:
- Size: 264.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc97574aa223b12b59312c68ca9a6c3747fa676393be91aadc340228f07d68fe
|
|
| MD5 |
4717ddbd1949d19913998533e6b4f9e8
|
|
| BLAKE2b-256 |
869db50bc65ced1ef6680ad8b71a1bb6a517c600a6d3bd29bb9cd2aecffac592
|
Provenance
The following attestation bundles were made for cognisn_cloudledger-0.1.0a2.tar.gz:
Publisher:
publish.yml on Cognisn/cloudledger
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cognisn_cloudledger-0.1.0a2.tar.gz -
Subject digest:
bc97574aa223b12b59312c68ca9a6c3747fa676393be91aadc340228f07d68fe - Sigstore transparency entry: 2522706520
- Sigstore integration time:
-
Permalink:
Cognisn/cloudledger@6c38790605905ae8b683a848cb4502d364362219 -
Branch / Tag:
refs/tags/v0.1.0a2 - Owner: https://github.com/Cognisn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6c38790605905ae8b683a848cb4502d364362219 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cognisn_cloudledger-0.1.0a2-py3-none-any.whl.
File metadata
- Download URL: cognisn_cloudledger-0.1.0a2-py3-none-any.whl
- Upload date:
- Size: 202.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65bc2cfe087908b276b01500feabb02bcea4fcdbfd98e592649202cd076ca48a
|
|
| MD5 |
38e7f0ebab51910cdb5ad3d93a0227bf
|
|
| BLAKE2b-256 |
874c47794bfcbf073d404e22f30b6b2055c28f8a1b1853a4737972b714e219c0
|
Provenance
The following attestation bundles were made for cognisn_cloudledger-0.1.0a2-py3-none-any.whl:
Publisher:
publish.yml on Cognisn/cloudledger
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cognisn_cloudledger-0.1.0a2-py3-none-any.whl -
Subject digest:
65bc2cfe087908b276b01500feabb02bcea4fcdbfd98e592649202cd076ca48a - Sigstore transparency entry: 2522706573
- Sigstore integration time:
-
Permalink:
Cognisn/cloudledger@6c38790605905ae8b683a848cb4502d364362219 -
Branch / Tag:
refs/tags/v0.1.0a2 - Owner: https://github.com/Cognisn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6c38790605905ae8b683a848cb4502d364362219 -
Trigger Event:
push
-
Statement type: