How kavinsuriya3107-cyber/mqtt-security-auditor works
MQTT Security Auditor is a CLI tool that assesses an MQTT broker and produces prioritized findings plus an HTML report. The main workflow is user request → configuration and scan orchestration → broker discovery, authentication, topic and ACL analysis, TLS auditing, and resilience checks → risk scoring → terminal and HTML results. The orchestrator shares scan context across modules; authentication also uses a configurable credential wordlist. The README documents the full capability set, while some module internals were only sampled, so those relationships rely on documented behavior rather than inferred calls.
Main entry points: orchestrator.py Scan orchestrator · scorer.py Risk scorer · base.py Module interface · cli.py Scan CLI
Components 18
CLI and configuration
- Scan CLI
mqtt_auditor/cli.py - Config loader
mqtt_auditor/config.py - Default profile
configs/default.yaml - Credential list
wordlists/mqtt_defaults.txt
Broker audit
- Scan orchestrator
mqtt_auditor/orchestrator.py - Module interface
mqtt_auditor/modules/base.py - Broker discovery
mqtt_auditor/modules/discovery.py - Authentication audit
mqtt_auditor/modules/auth.py - Topic analysis
mqtt_auditor/modules/topics.py - ACL checks
mqtt_auditor/modules/acl.py - TLS audit
mqtt_auditor/modules/tls_audit.py - Resilience checks
mqtt_auditor/modules/dos.py
Findings and reports
- Risk scorer
mqtt_auditor/scorer.py - Terminal findings
mqtt_auditor/cli.py - HTML reporter
mqtt_auditor/reporter/html_report.py - Report template
mqtt_auditor/reporter/templates/report.html
Other components
- Operator
- MQTT broker
Connections 33
- Operator → Scan CLI: starts scan
README.md - Scan CLI → Config loader: loads settings
mqtt_auditor/cli.py - Config loader → Default profile: loads profile
README.md - Scan CLI → Scan orchestrator: starts scan
mqtt_auditor/cli.py - Scan orchestrator → Broker discovery: runs first
mqtt_auditor/orchestrator.py - Scan orchestrator → Authentication audit: runs audit
mqtt_auditor/orchestrator.py - Scan orchestrator → Topic analysis: runs audit
mqtt_auditor/orchestrator.py - Scan orchestrator → ACL checks: runs audit
mqtt_auditor/orchestrator.py - Scan orchestrator → TLS audit: runs audit
mqtt_auditor/orchestrator.py - Scan orchestrator → Resilience checks: runs audit
mqtt_auditor/orchestrator.py - Scan orchestrator → Risk scorer: creates scorer
mqtt_auditor/orchestrator.py - Authentication audit → Credential list: reads credentials
mqtt_auditor/modules/auth.py - Broker discovery → MQTT broker: probes service
mqtt_auditor/modules/discovery.py - Authentication audit → MQTT broker: tests access
mqtt_auditor/modules/auth.py - Topic analysis → MQTT broker: subscribes topics
mqtt_auditor/modules/topics.py - ACL checks → MQTT broker: tests permissions
mqtt_auditor/modules/acl.py - TLS audit → MQTT broker: checks TLS
mqtt_auditor/modules/tls_audit.py - Resilience checks → MQTT broker: tests resilience
mqtt_auditor/modules/dos.py - Broker discovery → Module interface: extends interface
README.md - Authentication audit → Module interface: extends interface
mqtt_auditor/modules/auth.py - Topic analysis → Module interface: extends interface
mqtt_auditor/modules/topics.py - ACL checks → Module interface: extends interface
mqtt_auditor/modules/acl.py - TLS audit → Module interface: extends interface
mqtt_auditor/modules/tls_audit.py - Resilience checks → Module interface: extends interface
mqtt_auditor/modules/dos.py - Authentication audit → Risk scorer: registers findings
mqtt_auditor/modules/auth.py - Topic analysis → Risk scorer: registers findings
README.md - ACL checks → Risk scorer: registers findings
README.md - TLS audit → Risk scorer: registers findings
mqtt_auditor/modules/tls_audit.py - Resilience checks → Risk scorer: registers findings
README.md - Risk scorer → Scan orchestrator: returns results
README.md - Scan CLI → Terminal findings: prints summary
mqtt_auditor/cli.py - Scan CLI → HTML reporter: generates report
mqtt_auditor/cli.py - HTML reporter → Report template: renders template
mqtt_auditor/reporter/html_report.py