Enables scanning of AWS accounts to detect security vulnerabilities and multi-step attack chains, providing breach cost estimations and remediation guidance via AWS CLI commands and Terraform HCL.
cloud-audit scans your AWS account and tells you exactly how to fix what it finds - AWS CLI commands, Terraform HCL, and documentation links you can copy-paste.
47 checks across 15 AWS resource types. Mapped to 16 CIS AWS Foundations Benchmark controls. 16 attack chain rules that correlate findings into exploitable attack paths.
Five things no other open-source CLI scanner does:
1. MCP Server - ask your AI to scan AWS
The first free, standalone AWS security MCP server. Prowler and Wiz have MCP servers, but both require their paid SaaS platform ($99+/month). cloud-audit MCP works locally - zero accounts, zero API keys, zero data sent anywhere.
One command to install:
claude mcp add cloud-audit -- uvx --from cloud-audit cloud-audit-mcpThen just ask:
"Scan my AWS account and show me the critical findings"
"What attack chains were detected?"
"How much risk exposure does my account have in dollars?"
"Show me the Terraform code to fix aws-iam-001"
6 tools: scan_aws, get_findings, get_attack_chains, get_remediation, get_health_score, list_checks. Works with Claude Code, Cursor, and VS Code Copilot.
# With pip
pip install cloud-audit
claude mcp add cloud-audit -- cloud-audit-mcp// Project-scoped config (.mcp.json in repo root - shared with team)
{
"cloud-audit": {
"command": "uvx",
"args": ["cloud-audit-mcp"]
}
}2. Attack Chains - correlate findings into real attack paths
Other scanners give you a flat list of 200+ findings. cloud-audit correlates them into attack paths an attacker would actually exploit.
How it works: individual findings are correlated into real attack paths:
+-----------+ +----------+ +-----------+
Internet -------->| Public SG |----->| EC2 Inst |----->| IMDS (v1) |
+-----------+ +----------+ +-----------+
aws-vpc-002 aws-ec2-004 |
v
+-----------------+
| Admin IAM Creds |
+-----------------+
|
v
+---------------------+
| Full Account Takeover|
+---------------------+
Detected by: AC-01, AC-02cloud-audit scan --format html --output report.html
+---- Attack Chains (3 detected) -----------------------------------+
| |
| CRITICAL Internet-Exposed Admin Instance |
| i-0abc123 - public SG + admin IAM role |
| > Attacker reaches EC2 > steals IMDS creds > admin |
| Fix: Restrict security group (effort: LOW) |
| |
| CRITICAL CI/CD to Admin Takeover |
| github-deploy - OIDC no sub + admin policy |
| > Any GitHub repo can assume admin AWS role |
| Fix: Add sub condition (effort: LOW) |
| |
| HIGH Zero Security Visibility |
| No CloudTrail + No GuardDuty + No Config |
| > Attackers operate completely undetected |
| Fix: Enable CloudTrail (effort: LOW) |
| |
+--------------------------------------------------------------------+
Found 3 attack chains from 22 individual findings.What others don't have
Feature | Prowler | Trivy | Checkov | cloud-audit |
Individual checks | 584 | 517 | 2500+ | 47 |
Attack chain detection | No | No | No | 16 rules |
Remediation per finding | Partial | No | Links | 100% |
Breach cost estimation | No | No | No | Per finding + chain |
MCP server (AI agents) | Paid ($99/mo) | No | No | Free, standalone |
Scan time (typical) | 4+ hours | Minutes | Seconds (IaC) | Seconds |
ID | Name | Severity | Component Checks |
AC-01 | Internet-Exposed Admin Instance | CRITICAL | aws-vpc-002 + EC2 IAM role |
AC-02 | SSRF to Credential Theft | CRITICAL | aws-vpc-002 + aws-ec2-004 |
AC-05 | Public Lambda with Admin Access | CRITICAL | aws-lambda-001 + Lambda IAM role |
AC-07 | CI/CD to Admin Takeover | CRITICAL | aws-iam-007 + IAM role policies |
AC-09 | Unmonitored Admin Access | CRITICAL | aws-iam-001 + aws-ct-001 |
AC-10 | Completely Blind Admin | CRITICAL | aws-iam-001 + aws-ct-001 + aws-gd-001 |
AC-11 | Zero Security Visibility | HIGH | aws-ct-001 + aws-gd-001 + aws-cfg-001 |
AC-12 | Admin Without MFA | CRITICAL | aws-iam-005 + aws-iam-002 |
AC-13 | Wide Open and Unmonitored Network | HIGH | aws-vpc-002 + aws-vpc-003 |
AC-14 | No Network Security Layers | HIGH | aws-vpc-004 + aws-vpc-002 + aws-vpc-003 |
AC-17 | Exposed Database Without Audit Trail | CRITICAL | aws-rds-001 + aws-rds-002 + aws-ct-001 |
AC-19 | Container Breakout Path | CRITICAL | aws-ecs-001 + aws-ecs-003 |
AC-20 | Unmonitored Container Access | HIGH | aws-ecs-002 + aws-ecs-003 |
AC-21 | Secrets in Plaintext Across Services | HIGH | aws-ssm-002 + aws-lambda-003 |
AC-23 | CI/CD Data Exfiltration | HIGH | aws-iam-007 + IAM role S3 policies |
AC-24 | CI/CD Lateral Movement | HIGH | aws-iam-007 + IAM role EC2 policies |
Based on MITRE ATT&CK Cloud, Datadog pathfinding.cloud, and AWS CIRT research.
3. Every finding includes a copy-paste fix
You don't just get a list of problems - you get the exact commands to fix them:
$ cloud-audit scan -R
CRITICAL Root account without MFA enabled
Resource: arn:aws:iam::123456789012:root
Compliance: CIS 1.5
CLI: aws iam create-virtual-mfa-device --virtual-mfa-device-name root-mfa
Terraform: resource "aws_iam_virtual_mfa_device" "root" { ... }
Docs: https://docs.aws.amazon.com/IAM/latest/UserGuide/...4. Built-in scan diff - track what changed
Run daily scans and compare them. See what got fixed, what's new, and what stayed the same - without a SaaS dashboard or paid backend.
$ cloud-audit diff yesterday.json today.json
╭───────── Score Change ──────────╮
│ 54 -> 68 (+14) │
╰─────────────────────────────────╯
Fixed (2):
CRITICAL aws-iam-001 root Root account without MFA
HIGH aws-vpc-002 sg-abc123 SG open on port 22
New (1):
HIGH aws-rds-001 staging-db RDS publicly accessible
Unchanged (8):
...This catches what IaC scanning misses: ClickOps changes, manual console edits, security group rules someone opened "temporarily" three months ago. Prowler offers similar tracking, but only through their paid cloud platform. Trivy, ScoutSuite, and Steampipe don't have it at all.
Exit code 0 = no new findings, 1 = regression. Plug it into a cron job, get notified when something gets worse. See daily-scan-with-diff.yml for a ready-to-use GitHub Actions workflow.
5. Breach cost estimation - dollar signs on every finding
Security teams speak in severities. Boards speak in dollars. cloud-audit translates findings into estimated financial risk based on published breach data (IBM Cost of a Data Breach 2024, Verizon DBIR, HIPAA enforcement actions).
+---- Health Score ----+
| 42 / 100 | Risk exposure $725K - $7.3M
+----------------------+
+---- Attack Chains (2 detected) ------------------------------------------+
| |
| CRITICAL SSRF to Credential Theft |
| i-0abc123 - public SG + IMDSv1 |
| Fix: Enforce IMDSv2 (effort: LOW) |
| Risk: $125K - $1.3M |
| |
+--------------------------------------------------------------------------+No other open-source scanner puts dollar amounts on findings. Every estimate links to its source (IBM, Verizon, OCC, MITRE) so you can verify it yourself.
Quick Start
pip install cloud-audit
cloud-audit scanThat's it. Uses your default AWS credentials and region. You'll get a health score and a list of findings in your terminal.
# Show remediation details for each finding
cloud-audit scan -R
# Specific profile and regions
cloud-audit scan --profile production --regions eu-central-1,eu-west-1
# Export all fixes as a runnable bash script
cloud-audit scan --export-fixes fixes.shTry it without an AWS account
pip install cloud-audit
cloud-audit demoThe demo command runs a simulated scan with sample data - output format, health score, and remediation details without any AWS credentials.
Who is this for
Small teams without a security team - get visibility into AWS security without buying a platform. Attack chains show you which findings actually matter
DevOps/SRE running pre-deploy checks - catch misconfigurations before they ship, with compound risk detection
Consultants auditing client accounts - generate a professional HTML report with attack chains and executive summary in one command
Teams that want CIS evidence without Security Hub - 16 CIS controls mapped, included in reports
What it checks
47 checks across IAM, S3, EC2, EIP, VPC, RDS, Lambda, ECS, CloudTrail, GuardDuty, KMS, SSM, Secrets Manager, CloudWatch, and AWS Config. Plus 16 attack chain rules that correlate findings into exploitable attack paths.
By severity: 9 Critical, 14 High, 16 Medium, 8 Low.
Every check answers one question: would an attacker exploit this? If not, the check doesn't exist.
Security
ID | Severity | Description |
| Critical | Root account without MFA |
| High | IAM user with console access but no MFA |
| Medium | Access key older than 90 days |
| Medium | Access key unused for 30+ days |
| Critical | IAM policy with Action: * and Resource: * |
| Medium | Password policy below CIS requirements |
| Critical | OIDC trust policy without sub condition |
| High | S3 bucket without public access block |
| Low | S3 bucket using SSE-S3 instead of SSE-KMS |
| Medium | S3 bucket without access logging |
| High | Publicly shared AMI |
| Medium | Unencrypted EBS volume |
| High | EC2 instance with IMDSv1 (SSRF risk) |
| Medium | Default VPC in use |
| Critical | Security group open to 0.0.0.0/0 on sensitive ports |
| Medium | VPC without flow logs |
| Medium | Network ACL allows all inbound from 0.0.0.0/0 |
| Critical | Publicly accessible RDS instance |
| High | Unencrypted RDS instance |
| Critical | No multi-region CloudTrail trail |
| High | CloudTrail log file validation disabled |
| Critical | CloudTrail S3 bucket is publicly accessible |
| High | GuardDuty not enabled |
| Medium | GuardDuty findings unresolved for 30+ days |
| Medium | AWS Config not enabled |
| High | AWS Config recorder stopped |
| Medium | KMS key without automatic rotation |
| High | KMS key policy with Principal: * |
| High | No CloudWatch alarm for root account usage |
| High | Lambda function URL with no authentication |
| Medium | Lambda running on a deprecated runtime |
| High | Potential secrets in Lambda environment variables |
| Critical | ECS task running in privileged mode |
| High | ECS task without log configuration |
| Medium | ECS service with Execute Command enabled |
| Medium | EC2 instance not managed by Systems Manager |
| High | SSM parameter with secret stored as plain String |
| Medium | Secrets Manager secret without rotation |
Cost
ID | Severity | Description |
| Low | Unattached Elastic IP ($3.65/month) |
| Low | Stopped EC2 instance (EBS charges continue) |
| Low | S3 bucket without lifecycle rules |
| Low | Secrets Manager secret unused for 90+ days ($0.40/month) |
Reliability
ID | Severity | Description |
| Low | S3 bucket without versioning |
| Medium | Single-AZ RDS instance (no automatic failover) |
| Low | RDS auto minor version upgrade disabled |
| Low | EC2 instance without termination protection |
| Medium | EBS default encryption disabled |
Export fixes as a script
cloud-audit scan --export-fixes fixes.shThe script is commented and uses set -e - review it, uncomment what you want to apply, and run.
Reports
# HTML report (dark-mode, self-contained, client-ready)
cloud-audit scan --format html --output report.html
# JSON
cloud-audit scan --format json --output report.json
# SARIF (GitHub Code Scanning integration)
cloud-audit scan --format sarif --output results.sarif
# Markdown (for PR comments)
cloud-audit scan --format markdown --output report.mdFormat is auto-detected from file extension when using --output.
Installation
pip (recommended)
pip install cloud-auditpipx (isolated environment)
pipx install cloud-auditDocker
docker run ghcr.io/gebalamariusz/cloud-audit scanMount your AWS credentials:
docker run -v ~/.aws:/home/cloudaudit/.aws:ro ghcr.io/gebalamariusz/cloud-audit scanFrom source
git clone https://github.com/gebalamariusz/cloud-audit.git
cd cloud-audit
pip install -e .Usage
# Scan all enabled regions
cloud-audit scan --regions all
# Filter by category
cloud-audit scan --categories security,cost
# Filter by minimum severity
cloud-audit scan --min-severity high
# Cross-account scanning via IAM role
cloud-audit scan --role-arn arn:aws:iam::987654321098:role/auditor
# Quiet mode (exit code only - for CI/CD)
cloud-audit scan --quiet
# List all available checks
cloud-audit list-checks
cloud-audit list-checks --categories securityExit codes
Code | Meaning |
0 | No findings (after suppressions and severity filter) |
1 | Findings detected |
2 | Scan error (bad credentials, invalid config) |
Create .cloud-audit.yml in your project root:
provider: aws
regions:
- eu-central-1
- eu-west-1
min_severity: medium
exclude_checks:
- aws-eip-001
- aws-ec2-003
suppressions:
- check_id: aws-vpc-001
resource_id: vpc-abc123
reason: "Legacy VPC, migration planned for Q3"
accepted_by: "jane@example.com"
expires: "2026-09-30"Auto-detected from the current directory. Override with --config path/to/.cloud-audit.yml.
Variable | Description | Example |
| Comma-separated regions |
|
| Minimum severity filter |
|
| Comma-separated check IDs to skip |
|
| IAM role ARN for cross-account |
|
Precedence: CLI flags > environment variables > config file > defaults.
CI/CD Integration
GitHub Actions
- run: pip install cloud-audit
- run: cloud-audit scan --format sarif --output results.sarif
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarifThis gives you findings in the GitHub Security tab (via SARIF). Add --format markdown for PR comments.
Ready-to-use workflows
Workflow | Use case |
Basic scan with SARIF upload and PR comments | |
Scheduled daily scan + diff to catch drift | |
Scan before and after |
Daily diff is the most common setup - it catches ClickOps changes, manual console edits, and regressions that IaC scanning can't see (because IaC scans code, not live AWS).
AWS Permissions
cloud-audit requires read-only access. Attach the AWS-managed SecurityAudit policy:
aws iam attach-role-policy \
--role-name auditor-role \
--policy-arn arn:aws:iam::aws:policy/SecurityAuditcloud-audit never modifies your infrastructure. It only makes read API calls.
Health Score
Starts at 100, decreases per finding:
Severity | Points deducted |
Critical | -20 |
High | -10 |
Medium | -5 |
Low | -2 |
80+ is good, 50-79 needs attention, below 50 requires immediate action.
Alternatives
There are mature tools in this space. Pick the right one for your use case:
Prowler - 576+ checks across AWS/Azure/GCP, full CIS benchmark coverage, auto-remediation with
--fix. The most comprehensive open-source scanner. Best for teams that need exhaustive compliance audits and don't mind longer scan times.ScoutSuite - Multi-cloud scanner with an interactive HTML report. No releases in over 12 months - effectively unmaintained.
Trivy - Container, IaC, and cloud scanner. Strong on containers, growing cloud coverage (~517 cloud checks).
Steampipe - SQL-based cloud querying. Very flexible, but requires writing or configuring queries.
AWS Security Hub - Native AWS service with continuous monitoring and ~223 checks. Free 30-day trial, then charges per check evaluation.
cloud-audit fills a specific niche: a focused audit with copy-paste remediation for each finding, plus attack chain detection that correlates individual findings into exploitable paths - the only open-source CLI scanner with compound risk detection. If you need full CIS compliance coverage, Prowler is the better choice. If you need a quick scan that shows how findings combine into real attack paths and tells you exactly how to fix each issue, cloud-audit is built for that.
What's next
Terraform drift detection - compare scan results against tfstate
Root cause grouping - "fix 1 setting, close 12 findings"
More attack chain rules based on community feedback
Past releases: CHANGELOG.md
Development
git clone https://github.com/gebalamariusz/cloud-audit.git
cd cloud-audit
pip install -e ".[dev]"
pytest -v # tests
ruff check src/ tests/ # lint
ruff format --check src/ tests/ # format
mypy src/ # type checkSee CONTRIBUTING.md for how to add a new check.