Cloud security audit tools for AI agents.
Prowler gives you a 200-page PDF.
This gives your AI agent direct access to cloud APIs — it reads, correlates, and fixes.
The Problem • How It's Different • Quick Start • What The AI Can Do • Tools • Checks • Architecture
______________________________________________________________________
问题
云安全工具十年来没有改变。你运行Prowler,等待30分钟,得到一份200页的报告,然后 你 必须阅读它,理解它,优先考虑它,并修复它。每一个。单身。时间。
Traditional workflow:
prowler aws --compliance cis_3.0 → 200 findings, 40 pages
you read the report → 2 hours
you figure out what matters → 30 minutes
you write the fix commands → 1 hour
you run them → 30 minutes
─────────────────────────────────────
Total: 4+ hours of your time云审计mcp 消除了人为瓶颈。你的人工智能代理直接调用云API,了解它发现了什么,将检查链接在一起,并在几秒钟内告诉你要修复什么。
With cloud-audit-mcp:
You: "Check my AWS account for critical misconfigurations and fix them"
Agent: → calls aws_check_s3_public, aws_check_iam_policies, aws_check_ec2_imds...
→ correlates: "This Lambda has admin role AND secrets in env vars"
→ prioritizes: "3 critical, 5 high — here's the impact of each"
→ "Run these 3 commands to fix the critical ones"______________________________________________________________________
这有什么不同
每个现有的工具都是为 人类阅读报告.cloud审计mcp是为 AI代理采取行动.
Prowler / ScoutSuite / CloudSploit cloud-audit-mcp
Interface CLI → static report (PDF/HTML/JSON) MCP → AI agent calls tools in real-time
Intelligence Run all checks, dump results Agent picks which checks to run based on context
Correlation None — each finding is isolated Agent chains findings: "This public S3 + this Lambda role = data exfil path"
Remediation Generic advice Agent generates exact CLI commands for your resources
Follow-up Re-run the entire scan Agent re-checks the specific resource after fix
Multi-cloud Separate tools per cloud Unified interface — AWS + Azure + GCP in one conversation
Scope Compliance-focused (CIS benchmarks) Offensive-focused — privilege escalation paths, credential exposure, attack chains
Specific comparisons with popular tools
| 工具 | 星星 | 它能做什么 | 它不能做什么 |
|---|---|---|---|
| 潜行者 | 11k | 500+针对AWS/Azure/GCP/K8s的CIS/合规性检查 | 静态报告,没有AI集成,没有发现相关性 |
| ScoutSuite | 6k | 带HTML仪表板的多云审计 | 离线报告,无实时交互,约100次检查 |
| CloudSploit | 3k | 跨越6个云的150多个检查 | 每个检查都有插件,没有交叉检查智能 |
| 蒸汽管 | 7k | 针对云API的SQL查询,1500多个控件 | 需要SQL知识,没有自主分析 |
| 制图学 | 3k | Neo4j云资源+关系图 | 需要Neo4j/Cypher,没有预定义的安全检查 |
| 三叉戟 | 24k | 容器/IaC/云漏洞扫描程序 | 主要是CVE扫描,有限的配置错误检查 |
所有这些都是优秀的工具。云审计mcp并没有取代它们——它填补了它们都没有解决的空白: 让AI代理直接、交互式地访问云安全检查.
______________________________________________________________________
快速开始
安装
git clone https://github.com/badchars/cloud-audit-mcp.git
cd cloud-audit-mcp
bun install连接到您的AI代理
Claude Code
claude mcp add cloud-audit bun run /path/to/cloud-audit-mcp/src/index.tsClaude Desktop
增添 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"cloud-audit": {
"command": "bun",
"args": ["run", "/path/to/cloud-audit-mcp/src/index.ts"],
"env": {
"AWS_PROFILE": "your-profile"
}
}
}
}Cursor / Windsurf / other MCP clients
相同的JSON配置格式。将命令指向您的安装路径。
设置云凭据
MCP服务器使用您现有的云凭据。不需要额外的API密钥。
# AWS — any of these:
aws configure # interactive setup
export AWS_PROFILE=my-profile # named profile
export AWS_ACCESS_KEY_ID=... # explicit keys
# Azure
export AZURE_SUBSCRIPTION_ID=... # required
az login # interactive login (recommended)
# or: AZURE_TENANT_ID + AZURE_CLIENT_ID + AZURE_CLIENT_SECRET
# GCP
export GCP_PROJECT_ID=my-project # required
gcloud auth application-default login # interactive login (recommended)
# or: GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json开始审核
You: "Check my AWS account for critical security issues"就这样,剩下的就交给特工了。
______________________________________________________________________
AI能做什么
有针对性的安全审计
You: "I'm worried about data exposure in our S3 buckets and Lambda functions"
Agent: → aws_check_s3_public
Found 2 public buckets: "staging-assets" and "client-uploads"
→ aws_check_s3_objects
"client-uploads" contains 847 .sql files and 12 .pem files
→ aws_check_lambda_env
Lambda "process-uploads" has DATABASE_URL with plaintext credentials
→ "Critical: Your upload pipeline has public S3 + Lambda with DB creds.
An attacker could download SQL dumps AND get your database password.
Fix: 1) Block public access 2) Move creds to Secrets Manager"多云态势评估
You: "Audit all three cloud accounts and give me the top 10 issues"
Agent: → cloud_run_all {provider: "aws"} (13 checks)
→ cloud_run_all {provider: "azure"} (13 checks)
→ cloud_run_all {provider: "gcp"} (8 checks)
→ cloud_audit_summary
→ cloud_audit_report
→ "34 total findings across 3 clouds.
Top 3 critical:
1. AWS: IAM policy allows privilege escalation via CreatePolicyVersion
2. Azure: SQL Server firewall allows 0.0.0.0/0
3. GCP: 4 instances have cloud-platform scope (full API access)"权限升级检测
You: "Can anyone escalate privileges in our AWS account?"
Agent: → aws_check_iam_policies
Found PassRole + CreateFunction combo on role "dev-deploy-role"
Found CreatePolicyVersion on user "ci-bot"
→ aws_check_lambda_permissions
"ci-bot" has UpdateFunctionCode on all Lambda functions
→ "Two escalation paths:
1. dev-deploy-role can create a Lambda with any role → admin
2. ci-bot can inject code into any Lambda AND create policy versions
Both should be restricted immediately."Pre-Pentest Cloud Recon
You: "We have a pentest next week. What would an attacker find?"
Agent: → aws_check_ec2_imds → 12 instances with IMDSv1 (SSRF → creds)
→ aws_check_ec2_snapshots → 3 unencrypted public snapshots
→ aws_check_api_gateway → 7 endpoints with no auth
→ aws_check_secrets_manager → 1 secret with Principal: "*"
→ "Attacker's likely path: public API Gateway → SSRF on EC2 →
IMDSv1 credential theft → access SecretsManager secret →
pivot to production database. Priority fixes: IMDSv2 + API auth"Azure容器安全
You: "Check our Azure container infrastructure"
Agent: → azure_check_acr → Admin user enabled on 2 registries
→ azure_check_functions → 3 Function Apps with anonymous auth
→ azure_check_keyvault → Key Vault allows all networks
→ azure_check_webapp → SCM basic auth enabled, 5 connection strings with passwords
→ "Your container supply chain is exposed:
ACR admin creds can push malicious images,
Functions run without auth, and Key Vault is network-open."GCP Kubernetes审核
You: "How secure are our GKE clusters?"
Agent: → gcp_check_kubernetes → Legacy ABAC enabled, no Workload Identity
→ gcp_check_metadata → 8 nodes with cloud-platform scope
→ gcp_check_iam_keys → 3 SA keys older than 365 days
→ gcp_check_iam_delegation → Token Creator role on 2 SAs
→ "Your GKE setup has multiple escalation paths:
Pods use node SA with full cloud-platform scope → can access all GCP APIs.
Workload Identity not configured → any pod can steal node credentials.
Recommendation: Enable Workload Identity + restrict scopes."______________________________________________________________________
工具参考(38个工具)
AWS(13个工具)
| 工具 | 服务 | 检查 | 严重性 |
|---|---|---|---|
aws_check_s3_public | S3 | 阻止公共访问、存储桶策略、ACL | 关键 |
aws_check_s3_objects | S3 | 敏感文件(.pem、.sql、.env、备份) | 关键 |
aws_check_iam_policies | IAM | 特权升级路径,危险组合 | 关键 |
aws_check_ec2_imds | EC2 | 启用IMDSv1(通过SSRF盗取凭证) | 关键 |
aws_check_ec2_snapshots | EC2 | 未加密/公开共享的EBS快照 | 关键 |
aws_check_ec2_security_groups | EC2 | 危险端口上的0.0.0.0/0入口 | 高 |
aws_check_lambda_env | Lambda | 环境变量中的秘密 | 关键 |
aws_check_lambda_permissions | Lambda | UpdateFunctionCode,事件源风险 | 高 |
aws_check_ecr_images | ECR | 图像扫描结果,扫描配置 | 高 |
aws_check_secrets_manager | 机密管理器 | 资源策略过于宽松 | 高 |
aws_check_dynamodb | DynamoDB | 加密设置,流暴露 | 高 |
aws_check_api_gateway | API网关 | 没有身份验证的端点 | 高 |
aws_check_sagemaker | SageMaker | 互联网接入、root访问、加密 | 高 |
Azure(13个工具)
| 工具 | 服务 | 检查 | 严重性 |
|---|---|---|---|
azure_check_storage_public | 存储 | 公共blob访问,容器访问级别 | 关键 |
azure_check_storage_sas | 存储 | 长期SAS令牌,共享密钥访问 | 高 |
azure_check_automation | 自动化 | 运行本中的硬编码凭据、DSC明文、未加密变量 | 关键 |
azure_check_vm_network | VM/NSG | 暴露在互联网上的管理端口(SSH/RDP/WinRM) | 关键 |
azure_check_vm_encryption | VM | 未加密的操作系统和数据磁盘 | 高 |
azure_check_vm_identity | VM | 管理身份权限过大,IMDS暴露 | 严重 |
azure_check_ad_consent | Entra ID | OAuth同意设置,描述中的秘密 | 高 |
azure_check_logic_apps | 逻辑应用程序 | 通过托管身份+HTTP触发器的SSRF | 关键 |
azure_check_functions | 功能 | 匿名身份验证,密钥库参考注入 | 关键 |
azure_check_keyvault | 密钥库 | 允许访问策略,网络暴露 | 中等 |
azure_check_acr | 容器注册表 | 管理员用户启用,图像机密 | 高 |
azure_check_sql | SQL数据库 | SQL身份验证模式,防火墙0.0.0.0规则 | 关键 |
azure_check_webapp | 应用服务 | SCM基本身份验证、连接字符串凭据、部署包 | 高 |
GCP(8个工具)
| 工具 | 服务 | 检查 | 严重性 |
|---|---|---|---|
gcp_check_gcs_public | 云存储 | 所有用户/所有经过身份验证的用户IAM绑定 | 关键 |
gcp_check_gcs_objects | 云存储 | SA密钥文件,桶中的敏感数据 | 关键 |
gcp_check_metadata | 计算引擎 | 启动脚本秘密、云平台范围、遗留元数据 | 关键 |
gcp_check_iam_keys | IAM | SA密钥期限,用户管理密钥审核 | 高 |
gcp_check_iam_delegation | IAM | SA模拟链,令牌创建者滥用 | 关键 |
gcp_check_iam_compute | IAM | 设置元数据权限(SSH密钥注入) | 高 |
gcp_check_kubernetes | GKE | 遗留ABAC、工作负载标识、特权Pod、网络策略 | 关键 |
gcp_check_gcr | 容器注册表 | 公共访问,可疑图像 | 高 |
Meta(4个工具)
| 工具 | 说明 |
|---|---|
cloud_list_checks | 列出所有可用的检查,可按提供者/严重性/优先级进行筛选 |
cloud_run_all | 在一次呼叫中运行提供程序的所有检查 |
cloud_audit_summary | 按状态、提供者、严重程度汇总调查结果 |
cloud_audit_report | 根据会话结果生成markdown或JSON报告 |
______________________________________________________________________
检查注册表(60+次检查)
在适用的情况下,每个检查都符合行业标准。
AWS — 19 checks
| ID | 检查 | 严重性 | 优先级 | 引用 |
|---|---|---|---|---|
| S3-001 | 公共桶访问(ACL+策略+阻止公共访问) | 关键 | P0 | CIS 2.1.4,NIST AC-3 |
| S3-002 | S3中的敏感对象(SSH密钥、SQL转储) | CRITICAL | P0 | OWASP Cloud-2 |
| S3-003 | 存储桶名称泄漏帐户ID | LOW | P2 | |
| IAM-001 | 策略版本特权升级 | 关键 | P0 | MITRE T1098 |
| IAM-002 | 危险权限组合(PassRole+CreateFunction) | 关键 | P0 | Rhino安全 |
| IAM-003 | 具有管理员访问权限的Lambda执行角色 | 高 | P1 | CIS 1.16 |
| EC2-001 | IMDSv1已启用(SSRF→ 凭证被盗) | 严重 | P0 | CIS 5.6,MITRE T1552.005 |
| EC2-002 | 未加密/公开共享的EBS快照 | 关键 | P0 | CIS 2.2.1 |
| EC2-003 | 入口为0.0.0.0/0的安全组 | 高 | P1 | CIS 5.1-5.3 |
| LAMBDA-001 | LAMBDA环境变量中的秘密 | 关键 | P0 | MITRE T1552.001 |
| LAMBDA-002 | 更新函数代码权限 | 关键 | P0 | Rhino安全 |
| LAMBDA-003 | 作为调用旁路的事件源映射 | 高 | P1 | Rhino安全 |
| ECR-001 | 图像扫描结果 | 关键 | P0 | OWASP Cloud-3 |
| ECR-002 | 图像扫描配置 | 中等 | P2 | OWASP Cloud-3 |
| SM-001 | 过度许可的秘密访问策略 | 高 | P1 | CIS 2.4 |
| DYNAMO-001 | DynamoDB加密设置 | HIGH | P1 | NIST SC-28 |
| DYNAMO-002 | DynamoDB流数据流 | 高 | P1 | |
| APIGW-001 | 未经身份验证的API端点 | HIGH | P1 | OWASP Cloud-8 |
| SAGE-001 | SageMaker笔记本电脑访问+root | 高 | P1 |
Azure — 24 checks
| ID | 检查 | 严重性 | 优先级 | 引用 |
|---|---|---|---|---|
| STOR-001 | 启用公共blob访问 | 关键 | P0 | CIS 3.2,ASB NS-2 |
| STOR-002 | 容器公共访问级别 | 关键 | P0 | CIS 3.2 |
| STOR-003 | 长期SAS令牌 | 高 | P1 | CIS 3.7 |
| AUTO-001 | 运行手册中的硬编码凭据 | 高 | P1 | |
| AUTO-002 | DSC配置明文密码 | 关键 | P0 | |
| AUTO-003 | 未加密的自动化变量 | 高 | P1 | |
| VM-001 | 暴露的管理端口(SSH/RDP/WinRM) | 关键 | P0 | CIS 6.1-6.2 |
| VM-002 | 未加密的VM磁盘 | 高 | P1 | CIS 7.2 |
| VM-004 | 权限过大的管理身份 | 关键 | P0 | ASB PA-1 |
| VM-005 | IMDS代币被盗风险 | 高 | P1 | MITRE T1552.005 |
| AAD-001 | AD对象描述中的秘密 | HIGH | P1 | |
| AAD-002 | 用户同意设置(OAuth网络钓鱼) | 高 | P1 | ASB IM-1 |
| LOGIC-001 | SSRF通过管理身份 | 关键 | P0 | |
| FUNC-001 | 函数匿名身份验证 | 关键 | P0 | CIS 9.1 |
| FUNC-002 | 密钥库参考注入 | 中等 | P2 | |
| KV-001 | 密钥库访问权限过大 | 中等 | P2 | CIS 8.3 |
| KV-002 | 密钥库网络不受限制 | 中等 | P2 | CIS 8.4 |
| ACR-001 | 管理员用户已启用 | 高 | P1 | CIS |
| ACR-002 | 容器图像中的秘密 | 高 | P1 | |
| SQL-001 | 已启用SQL身份验证 | HIGH | P1 | CIS 4.4 |
| SQL-002 | 过于宽松的防火墙规则 | 关键 | P1 | CIS 6.3 |
| WEBAPP-001 | 启用SCM基本身份验证 | 中等 | P2 | CIS 9.1 |
| WEBAPP-002 | 带凭据的连接字符串 | HIGH | P1 | |
| WEBAPP-003 | 可访问存储中的部署包 | MEDIUM | P2 |
GCP — 17 checks
| ID | 检查 | 严重性 | 优先级 | 引用 |
|---|---|---|---|---|
| GCS-001 | 公共存储桶访问(所有用户/所有已认证用户) | 关键 | P0 | CIS 5.1 |
| GCS-002 | 存储桶中的SA密钥 | 关键 | P0 | OWASP Cloud-2 |
| GCS-003 | 桶中的敏感文件 | HIGH | P1 | |
| META-001 | 启动脚本机密 | 关键 | P0 | MITRE T1552.001 |
| META-002 | 具有云平台作用域的实例 | 关键 | P0 | CIS 4.2 |
| META-003 | 未启用元数据隐藏 | HIGH | P1 | CIS 4.9 |
| IAM-001g | 服务帐户密钥审计 | 高 | P1 | CIS 1.3-1.4 |
| IAM-002g | 委托链检测 | 关键 | P0 | Rhino安全 |
| IAM-003g | 令牌创建者角色滥用 | 高 | P1 | Rhino安全 |
| IAM-004g | 设置元数据权限(SSH密钥注入) | 关键 | P0 | Rhino安全 |
| K8S-001 | 具有群集管理的默认SA | 关键 | P0 | CIS K8S 5.1 |
| K8S-002 | 允许特权容器 | 关键 | P0 | CIS K8S 5.2 |
| K8S-003 | 节点池上的安全启动 | 高 | P1 | CIS K8S 4.2 |
| K 8 s-004 | 令牌自动挂载 | 中等 | P2 | CIS K 8 s 5.1.6 |
| GCR-001 | GCR中的意外/隐藏图像 | 高 | P1 |
______________________________________________________________________
建筑
cloud-audit-mcp/
├── src/
│ ├── index.ts Entry point + ToolContext builder
│ ├── types/
│ │ └── index.ts CheckResult, Severity, ToolDef, ToolContext
│ ├── protocol/
│ │ ├── mcp-server.ts MCP server (stdio transport)
│ │ └── tools.ts 38 tool definitions (Zod schemas)
│ ├── aws/ 13 tools, 10 files
│ │ ├── client.ts Lazy SDK factory (cached per region)
│ │ ├── s3.ts S3-001, S3-002, S3-003
│ │ ├── iam.ts IAM-001, IAM-002, IAM-003
│ │ ├── ec2.ts EC2-001, EC2-002, EC2-003
│ │ ├── lambda.ts LAMBDA-001, LAMBDA-002, LAMBDA-003
│ │ ├── ecr.ts ECR-001, ECR-002
│ │ ├── secrets.ts SM-001
│ │ ├── dynamodb.ts DYNAMO-001, DYNAMO-002
│ │ ├── apigw.ts APIGW-001
│ │ └── sagemaker.ts SAGE-001
│ ├── azure/ 13 tools, 11 files
│ │ ├── client.ts DefaultAzureCredential factory
│ │ ├── storage.ts STOR-001, STOR-002, STOR-003
│ │ ├── automation.ts AUTO-001, AUTO-002, AUTO-003
│ │ ├── vm.ts VM-001, VM-002, VM-004, VM-005
│ │ ├── ad.ts AAD-001, AAD-002
│ │ ├── logic.ts LOGIC-001
│ │ ├── functions.ts FUNC-001, FUNC-002
│ │ ├── keyvault.ts KV-001, KV-002
│ │ ├── acr.ts ACR-001, ACR-002
│ │ ├── sql.ts SQL-001, SQL-002
│ │ └── webapp.ts WEBAPP-001, WEBAPP-002, WEBAPP-003
│ ├── gcp/ 8 tools, 6 files
│ │ ├── client.ts ADC factory
│ │ ├── storage.ts GCS-001, GCS-002, GCS-003
│ │ ├── metadata.ts META-001, META-002, META-003
│ │ ├── iam.ts IAM-001g, IAM-002g, IAM-003g, IAM-004g
│ │ ├── kubernetes.ts K8S-001, K8S-002, K8S-003, K8S-004
│ │ └── gcr.ts GCR-001
│ └── meta/ 4 tools
│ ├── list-checks.ts Check registry (60+ entries)
│ ├── summary.ts Finding aggregation
│ ├── report.ts Markdown/JSON report generation
│ └── run-all.ts Run all provider checks
└── knowledge/ Security check knowledge base (8 files)设计决策
| 决策 | 选择 | 为什么 |
|---|---|---|
| 每次服务1个工具 | 38个工具,而不是60+ | LLM可以轻松选择合适的工具 |
| 统一检查结果 | 所有云的格式相同 | 代理可以跨提供商进行比较和关联 |
| 会话结果存储 | ToolContext上的内存数组 | 累积发现→ 总结→ 在一次对话中报告 |
| 惰性客户端初始化 | 首次使用时创建的SDK客户端 | 未使用的提供者不会受到冷启动惩罚 |
| 进攻重点 | 特权升级、凭据暴露、攻击链 | CIS合规工具已经存在——这可以找到攻击者发现的内容 |
| 默认凭据 | AWS配置文件、Azure CLI、gcloud ADC | 无需额外配置——使用已设置的配置 |
| 错误→ 检查结果 | SDK错误变为ERROR状态,永远不会崩溃 | 代理会看到所有结果,决定什么是重要的 |
运作原理
┌──────────────────────────────────────────────────────────────┐
│ AI Agent │
│ │
│ "Check S3 for public access" │
│ │ │
│ ▼ │
│ ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ MCP Client │───▶│ MCP Server │───▶│ Tool Router │ │
│ │ (stdio) │ │ (38 tools) │ │ (Zod valid) │ │
│ └─────────────┘ └──────────────┘ └──────┬───────┘ │
│ │ │
│ ┌───────────────────┬───────────────────┤ │
│ ▼ ▼ ▼ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ AWS Module │ │ Azure Module│ │ GCP Module │ │
│ │ (SDK v3) │ │ (ARM SDK) │ │ (Cloud SDK) │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ CheckResult[] (uniform format) │ │
│ │ { checkId, severity, status, resource, remediation }│ │
│ └──────────────────────┬──────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Findings Store (session-scoped) │ │
│ │ → cloud_audit_summary → cloud_audit_report │ │
│ └─────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────┘______________________________________________________________________
相关项目
| 项目 | 描述 |
|---|---|
| Hackbrowserv mcp | 基于浏览器的安全测试MCP(39个工具、Firefox、注入测试) |
| 侦察0 | 漏洞赏金侦察管道 |
______________________________________________________________________
局限性
- 只读--不修改云资源(按设计)
- 需要现有的云凭据(AWS配置文件、Azure CLI、gcloud ADC)
- Azure AD检查(AAD-001、AAD-002)需要Microsoft Graph API(存根)
- GCP IAM检查使用REST API调用(并非全部通过SDK公开)
- 会话发现仅在内存中(重新启动时丢失)
______________________________________________________________________
For authorized security testing and cloud posture assessment only.
Always ensure you have proper authorization before auditing cloud accounts.
MIT License • Built with Bun + TypeScript • Part of Agentic AI for Offensive Cybersecurity
