Skip to main content
Pre-release

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

cognisn_cloudledger-0.1.0a3.tar.gz (264.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cognisn_cloudledger-0.1.0a3-py3-none-any.whl (202.7 kB view details)

Uploaded Python 3

File details

Details for the file cognisn_cloudledger-0.1.0a3.tar.gz.

File metadata

  • Download URL: cognisn_cloudledger-0.1.0a3.tar.gz
  • Upload date:
  • Size: 264.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cognisn_cloudledger-0.1.0a3.tar.gz
Algorithm Hash digest
SHA256 a1386ba63bbd7957f8b6cbe0869d129f64c9f6e5c1361ea9104264d90a972de7
MD5 248c01d966f1aa247d2dcd9eb6e36566
BLAKE2b-256 7b76dd87fdafc044def73dc153f62c2f8f451b8af4ae7719ae55367710f8571f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cognisn_cloudledger-0.1.0a3.tar.gz:

Publisher: publish.yml on Cognisn/cloudledger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cognisn_cloudledger-0.1.0a3-py3-none-any.whl.

File metadata

File hashes

Hashes for cognisn_cloudledger-0.1.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 dc1dc79e3a9adf099935c5ea75fc6722b8ad1925615ac3be831f259cf909ed0c
MD5 a2c2ad25bc753c15a45b3e52c216df45
BLAKE2b-256 f10f56d004898cededdb090c5fcd4dcccc9dc531f73db0f1d48307eab3ce2d8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cognisn_cloudledger-0.1.0a3-py3-none-any.whl:

Publisher: publish.yml on Cognisn/cloudledger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page