How frangelbarrera/cloud-misconfig-scanner works
Cloud Misconfig Scanner is a CLI for finding cloud-storage misconfigurations. The principal workflow parses provider and output options, runs the selected scanner(s), combines findings, then filters and emits text, JSON, or HTML; findings also determine the CLI exit status. AWS S3 performs real API checks when credentials are available and can fall back to simulated findings. Azure Blob and GCP Storage are currently simulated. The README documents the provider capabilities; unsampled rule YAML contents and internal scanner details are not inferred here.
Main entry points: cli.py CLI orchestration · models.py Finding models · aws_s3.py AWS S3 scanner · azure_blob.py Azure Blob scanner
Components 14
CLI workflow
- Legacy entry
cms.py - Module entry
cms/__main__.py - CLI orchestration
cms/cli.py
Provider scanning
- AWS S3 scanner
cms/providers/aws_s3.py - Azure Blob scanner
cms/providers/azure_blob.py - GCP Storage scanner
cms/providers/gcp_storage.py - Provider base
cms/providers/base.py
Rules and findings
- Rule registry
cms/core/rules.py - Provider rule sets
cms/checks - Finding models
cms/core/models.py
Reports
- Text and JSON
cms/core/reporter.py - HTML report
cms/core/html_reporter.py
Other components
- CLI user
- AWS APIs
Connections 23
- CLI user → Legacy entry: launches
README.md - CLI user → Module entry: launches
README.md - Legacy entry → CLI orchestration: delegates
cms.py - Module entry → CLI orchestration: invokes
cms/__main__.py - CLI orchestration → AWS S3 scanner: runs
cms/cli.py - CLI orchestration → Azure Blob scanner: runs
cms/cli.py - CLI orchestration → GCP Storage scanner: runs
cms/cli.py - AWS S3 scanner → AWS APIs: queries
README.md - AWS S3 scanner → Rule registry: loads rules
cms/providers/aws_s3.py - Azure Blob scanner → Rule registry: loads rules
cms/providers/azure_blob.py - GCP Storage scanner → Rule registry: loads rules
cms/providers/gcp_storage.py - Provider rule sets → Rule registry: loaded by
cms/core/rules.py - AWS S3 scanner → Provider base: subclasses
cms/providers/aws_s3.py - Azure Blob scanner → Provider base: subclasses
cms/providers/azure_blob.py - GCP Storage scanner → Provider base: subclasses
cms/providers/gcp_storage.py - CLI orchestration → Text and JSON: prints text or JSON
cms/cli.py - CLI orchestration → HTML report: generates HTML
cms/cli.py - CLI orchestration → Finding models: merges results
cms/cli.py - AWS S3 scanner → Finding models: creates findings
cms/providers/aws_s3.py - Azure Blob scanner → Finding models: creates findings
cms/providers/azure_blob.py - GCP Storage scanner → Finding models: creates findings
cms/providers/gcp_storage.py - Text and JSON → Finding models: formats findings
cms/core/reporter.py - HTML report → Finding models: renders findings
cms/core/html_reporter.py