or: AZURETENANTID + AZURECLIENTID + AZURECLIENTSECRET

March 14, 2026 · View on GitHub


cloud-audit-mcp

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 ProblemHow It's DifferentQuick StartWhat The AI Can DoToolsChecksArchitecture

License Bun MCP 38 Tools 60+ Checks AWS | Azure | GCP


The Problem

Cloud security tools haven't changed in a decade. You run Prowler, wait 30 minutes, get a 200-page report, and then you have to read it, understand it, prioritize it, and fix it. Every. Single. Time.

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

cloud-audit-mcp eliminates the human bottleneck. Your AI agent calls the cloud APIs directly, understands what it finds, chains checks together, and tells you exactly what to fix — in seconds.

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"

How It's Different

Every existing tool is designed for humans to read reports. cloud-audit-mcp is designed for AI agents to take action.

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
ToolStarsWhat it doesWhat it can't do
Prowler11k500+ CIS/compliance checks for AWS/Azure/GCP/K8sStatic report, no AI integration, no finding correlation
ScoutSuite6kMulti-cloud audit with HTML dashboardOffline report, no real-time interaction, ~100 checks
CloudSploit3k150+ checks across 6 cloudsPlugin-per-check, no cross-check intelligence
Steampipe7kSQL queries against cloud APIs, 1500+ controlsRequires SQL knowledge, no autonomous analysis
Cartography3kNeo4j graph of cloud resources + relationshipsRequires Neo4j/Cypher, no predefined security checks
Trivy24kContainer/IaC/cloud vulnerability scannerPrimarily CVE scanning, limited misconfig checks

All of these are excellent tools. cloud-audit-mcp doesn't replace them — it fills a gap none of them address: giving an AI agent direct, interactive access to cloud security checks.


Quick Start

Install

git clone https://github.com/badchars/cloud-audit-mcp.git
cd cloud-audit-mcp
bun install

Connect to your AI agent

Claude Code
claude mcp add cloud-audit bun run /path/to/cloud-audit-mcp/src/index.ts
Claude Desktop

Add to ~/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

Same JSON config format. Point the command to your installation path.

Set up cloud credentials

The MCP server uses your existing cloud credentials. No extra API keys needed.

# 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

Start auditing

You: "Check my AWS account for critical security issues"

That's it. The agent handles the rest.


What The AI Can Do

Targeted Security Audit

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"

Multi-Cloud Posture Review

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)"

Privilege Escalation Detection

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 Container Security

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 Audit

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."

Tools Reference (38 tools)

AWS (13 tools)

ToolServiceChecksSeverity
aws_check_s3_publicS3Block Public Access, bucket policy, ACLCRITICAL
aws_check_s3_objectsS3Sensitive files (.pem, .sql, .env, backups)CRITICAL
aws_check_iam_policiesIAMPrivilege escalation paths, dangerous combosCRITICAL
aws_check_ec2_imdsEC2IMDSv1 enabled (credential theft via SSRF)CRITICAL
aws_check_ec2_snapshotsEC2Unencrypted / publicly shared EBS snapshotsCRITICAL
aws_check_ec2_security_groupsEC20.0.0.0/0 ingress on dangerous portsHIGH
aws_check_lambda_envLambdaSecrets in environment variablesCRITICAL
aws_check_lambda_permissionsLambdaUpdateFunctionCode, event source risksHIGH
aws_check_ecr_imagesECRImage scan findings, scan configurationHIGH
aws_check_secrets_managerSecrets ManagerOver-permissive resource policiesHIGH
aws_check_dynamodbDynamoDBEncryption settings, stream exposureHIGH
aws_check_api_gatewayAPI GatewayEndpoints without authenticationHIGH
aws_check_sagemakerSageMakerInternet access, root access, encryptionHIGH

Azure (13 tools)

ToolServiceChecksSeverity
azure_check_storage_publicStoragePublic blob access, container access levelCRITICAL
azure_check_storage_sasStorageLong-lived SAS tokens, shared key accessHIGH
azure_check_automationAutomationHardcoded creds in runbooks, DSC plaintext, unencrypted varsCRITICAL
azure_check_vm_networkVM / NSGManagement ports (SSH/RDP/WinRM) exposed to internetCRITICAL
azure_check_vm_encryptionVMUnencrypted OS and data disksHIGH
azure_check_vm_identityVMOver-privileged managed identities, IMDS exposureCRITICAL
azure_check_ad_consentEntra IDOAuth consent settings, secrets in descriptionsHIGH
azure_check_logic_appsLogic AppsSSRF via managed identity + HTTP triggersCRITICAL
azure_check_functionsFunctionsAnonymous auth, Key Vault reference injectionCRITICAL
azure_check_keyvaultKey VaultPermissive access policies, network exposureMEDIUM
azure_check_acrContainer RegistryAdmin user enabled, image secretsHIGH
azure_check_sqlSQL DatabaseSQL auth mode, firewall 0.0.0.0 rulesCRITICAL
azure_check_webappApp ServiceSCM basic auth, connection string creds, deployment packagesHIGH

GCP (8 tools)

ToolServiceChecksSeverity
gcp_check_gcs_publicCloud StorageallUsers / allAuthenticatedUsers IAM bindingsCRITICAL
gcp_check_gcs_objectsCloud StorageSA key files, sensitive data in bucketsCRITICAL
gcp_check_metadataCompute EngineStartup script secrets, cloud-platform scope, legacy metadataCRITICAL
gcp_check_iam_keysIAMSA key age, user-managed key auditHIGH
gcp_check_iam_delegationIAMSA impersonation chains, Token Creator abuseCRITICAL
gcp_check_iam_computeIAMsetMetadata permission (SSH key injection)HIGH
gcp_check_kubernetesGKELegacy ABAC, Workload Identity, privileged pods, network policyCRITICAL
gcp_check_gcrContainer RegistryPublic access, suspicious imagesHIGH

Meta (4 tools)

ToolDescription
cloud_list_checksList all available checks, filterable by provider / severity / priority
cloud_run_allRun all checks for a provider in one call
cloud_audit_summaryAggregate findings by status, provider, severity
cloud_audit_reportGenerate markdown or JSON report from session findings

Check Registry (60+ checks)

Every check maps to industry standards where applicable.

AWS — 19 checks
IDCheckSeverityPriorityReferences
S3-001Public bucket access (ACL + policy + Block Public Access)CRITICALP0CIS 2.1.4, NIST AC-3
S3-002Sensitive objects in S3 (SSH keys, SQL dumps)CRITICALP0OWASP Cloud-2
S3-003Bucket name leaks account IDLOWP2
IAM-001Policy version privilege escalationCRITICALP0MITRE T1098
IAM-002Dangerous permission combos (PassRole+CreateFunction)CRITICALP0Rhino Security
IAM-003Lambda execution roles with admin accessHIGHP1CIS 1.16
EC2-001IMDSv1 enabled (SSRF → credential theft)CRITICALP0CIS 5.6, MITRE T1552.005
EC2-002Unencrypted / publicly shared EBS snapshotsCRITICALP0CIS 2.2.1
EC2-003Security groups with 0.0.0.0/0 ingressHIGHP1CIS 5.1-5.3
LAMBDA-001Secrets in Lambda environment variablesCRITICALP0MITRE T1552.001
LAMBDA-002UpdateFunctionCode permissionCRITICALP0Rhino Security
LAMBDA-003Event source mapping as invocation bypassHIGHP1Rhino Security
ECR-001Image scan findingsCRITICALP0OWASP Cloud-3
ECR-002Image scanning configurationMEDIUMP2OWASP Cloud-3
SM-001Over-permissive secret access policiesHIGHP1CIS 2.4
DYNAMO-001DynamoDB encryption settingsHIGHP1NIST SC-28
DYNAMO-002DynamoDB streams data flowHIGHP1
APIGW-001API endpoints without authenticationHIGHP1OWASP Cloud-8
SAGE-001SageMaker notebook access + rootHIGHP1
Azure — 24 checks
IDCheckSeverityPriorityReferences
STOR-001Public blob access enabledCRITICALP0CIS 3.2, ASB NS-2
STOR-002Container public access levelCRITICALP0CIS 3.2
STOR-003Long-lived SAS tokensHIGHP1CIS 3.7
AUTO-001Hardcoded credentials in runbooksHIGHP1
AUTO-002DSC configuration plaintext passwordsCRITICALP0
AUTO-003Unencrypted automation variablesHIGHP1
VM-001Management ports exposed (SSH/RDP/WinRM)CRITICALP0CIS 6.1-6.2
VM-002Unencrypted VM disksHIGHP1CIS 7.2
VM-004Over-privileged managed identitiesCRITICALP0ASB PA-1
VM-005IMDS token theft exposureHIGHP1MITRE T1552.005
AAD-001Secrets in AD object descriptionsHIGHP1
AAD-002User consent settings (OAuth phishing)HIGHP1ASB IM-1
LOGIC-001SSRF via managed identityCRITICALP0
FUNC-001Anonymous auth on FunctionsCRITICALP0CIS 9.1
FUNC-002Key Vault reference injectionMEDIUMP2
KV-001Overly permissive Key Vault accessMEDIUMP2CIS 8.3
KV-002Key Vault network unrestrictedMEDIUMP2CIS 8.4
ACR-001Admin user enabledHIGHP1CIS
ACR-002Secrets in container imagesHIGHP1
SQL-001SQL authentication enabledHIGHP1CIS 4.4
SQL-002Overly permissive firewall rulesCRITICALP1CIS 6.3
WEBAPP-001SCM basic auth enabledMEDIUMP2CIS 9.1
WEBAPP-002Connection strings with credentialsHIGHP1
WEBAPP-003Deployment packages in accessible storageMEDIUMP2
GCP — 17 checks
IDCheckSeverityPriorityReferences
GCS-001Public bucket access (allUsers/allAuthenticatedUsers)CRITICALP0CIS 5.1
GCS-002SA keys in storage bucketsCRITICALP0OWASP Cloud-2
GCS-003Sensitive files in bucketsHIGHP1
META-001Startup script secretsCRITICALP0MITRE T1552.001
META-002Instance with cloud-platform scopeCRITICALP0CIS 4.2
META-003Metadata concealment not enabledHIGHP1CIS 4.9
IAM-001gService account key auditHIGHP1CIS 1.3-1.4
IAM-002gDelegation chain detectionCRITICALP0Rhino Security
IAM-003gToken Creator role abuseHIGHP1Rhino Security
IAM-004gsetMetadata permission (SSH key injection)CRITICALP0Rhino Security
K8S-001Default SA with cluster-adminCRITICALP0CIS K8s 5.1
K8S-002Privileged containers allowedCRITICALP0CIS K8s 5.2
K8S-003Secure Boot on node poolsHIGHP1CIS K8s 4.2
K8S-004SA token automountMEDIUMP2CIS K8s 5.1.6
GCR-001Unexpected/hidden images in GCRHIGHP1

Architecture

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)

Design Decisions

DecisionChoiceWhy
1 tool per service38 tools, not 60+LLM can pick the right tool without overwhelm
Uniform CheckResultSame format across all cloudsAgent can compare and correlate across providers
Session findings storeIn-memory array on ToolContextAccumulate findings → summarize → report in one conversation
Lazy client initSDK clients created on first useNo cold start penalty for unused providers
Offensive focusPrivilege escalation, credential exposure, attack chainsCIS compliance tools already exist — this finds what attackers find
Default credentialsAWS profiles, Azure CLI, gcloud ADCZero extra configuration — use what's already set up
Error → CheckResultSDK errors become ERROR status, never crashAgent sees all results, decides what matters

How It Works

┌──────────────────────────────────────────────────────────────┐
│                        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          │     │
│  └─────────────────────────────────────────────────────┘     │
└──────────────────────────────────────────────────────────────┘

ProjectDescription
hackbrowser-mcpBrowser-based security testing MCP (39 tools, Firefox, injection testing)
recon0Bug bounty recon pipeline

Limitations

  • Read-only — does not modify cloud resources (by design)
  • Requires existing cloud credentials (AWS profiles, Azure CLI, gcloud ADC)
  • Azure AD checks (AAD-001, AAD-002) require Microsoft Graph API (stubbed)
  • GCP IAM checks use REST API calls (not all exposed via SDK)
  • Session findings are in-memory only (lost on restart)

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