The ThothCTL Dashboard provides a unified web interface to view and manage all your infrastructure data in one place. It integrates scan results, inventory, cost analysis, drift detection, AI usage tracking, and risk assessments into a modern, responsive web application.
# Start dashboard on default port 8080
thothctl dashboard launch
# Custom port and host
thothctl dashboard launch --port 3000 --host 0.0.0.0
# Debug mode
thothctl dashboard launch --debug
# Don't open browser automatically
thothctl dashboard launch --no-browser
Once launched, the dashboard will be available at:
The dashboard automatically loads data from existing ThothCTL reports:
Reports/inventory/InventoryIaC_*.jsonthothctl inventory iac --check-versionsReports/inventory/InventoryIaC_cyclonedx_*.jsonthothctl inventory iac --check-versionsReports/**/*.html, Reports/**/*.xml, Reports/opa/html_reports/thothctl scan iacReports/**/cost_analysis_*.jsonthothctl check iac -type cost-analysisReports/**/blast_radius_*.jsonthothctl check projectReports/**/drift_*.jsonthothctl check iac -type drift --recursive.thothctl/ai_sessions/thothctl ai-review operationsThe findings viewer provides granular access to individual security findings across all scanning tools:
Full CycloneDX 1.6 support with rich metadata visualization:
Enhanced inventory browsing experience:
Visualize infrastructure drift directly in the dashboard:
Monitor AI provider consumption:
The infrastructure topology view is integrated within the Blast Radius tab, providing a unified visualization of your infrastructure dependencies and change impact:
Data source: Reports/topology/topology.json
Generate topology data:
thothctl check iac -type blast-radius --recursive
The dashboard follows twelve-factor app principles:
# Efficient file-based loading
class DashboardDataLoader:
def __init__(self):
self.cache = {}
self.cache_ttl = 300 # 5 minutes
def get_inventory_data(self):
# Load from Reports/inventory/InventoryIaC_*.json
# Cache for 5 minutes
# Graceful error handling
GET /api/inventory - Infrastructure inventoryGET /api/scan-results - Security scan resultsGET /api/findings?tool=&severity=&search=&limit=&offset= - Individual findings with filtering and paginationGET /api/sbom - CycloneDX SBOM dataGET /api/cost-analysis - Cost analysis dataGET /api/blast-radius - Risk assessment dataGET /api/topology - Infrastructure topology with mermaid diagramGET /api/drift - Drift detection dataGET /api/ai-usage - AI token/cost usageGET /api/reports/{path} - Serve HTML reports for iframe viewingGET /api/refresh - Clear cache and reload dataGET / - Main dashboard interface{
"components": [...],
"summary": {...},
"error": "Error message if any"
}
{
"findings": [...],
"total": 142,
"limit": 20,
"offset": 0,
"filters": {
"tool": "checkov",
"severity": "high",
"search": ""
}
}
# Debug logging
export THOTHCTL_DEBUG=true
# Verbose logging
export THOTHCTL_VERBOSE=true
# Custom host/port (can also use CLI flags)
# Default: 127.0.0.1:8080
The dashboard looks for these file patterns:
Reports/
βββ inventory/
β βββ InventoryIaC_*.json # Inventory data
β βββ InventoryIaC_cyclonedx_*.json # CycloneDX SBOM data
β βββ html_reports/ # Inventory HTML reports
βββ topology/
β βββ topology.json # Infrastructure topology data
β βββ architecture.png # AWS architecture diagram
βββ blast-radius/
β βββ blast_radius_*.json # Blast radius analysis
βββ opa/
β βββ html_reports/ # OPA/compliance HTML reports
βββ cost_analysis_*.json # Cost analysis
βββ blast_radius_*.json # Risk assessment
βββ drift_*.json # Drift detection
βββ **/*.html # Scan reports
βββ **/*.xml # Test results
src/thothctl/
βββ commands/dashboard/
β βββ cli.py # Command interface
β βββ commands/
β βββ launch.py # Launch command
βββ services/dashboard/
β βββ dashboard_service.py # FastAPI + Uvicorn web service
β βββ data_loader.py # Data loading logic
βββ utils/common/templates/
βββ dashboard.html # Web interface
def get_new_data_source(self) -> Dict[str, Any]:
cache_key = "new_source"
if self._is_cache_valid(cache_key):
return self.cache[cache_key]["data"]
# Load from files
data = load_from_files()
self._cache_data(cache_key, data)
return data
@self.app.get("/api/new-source")
async def api_new_source():
return self.data_loader.get_new_data_source()
async function loadNewSourceData() {
const response = await fetch('/api/new-source');
const data = await response.json();
// Update UI
}
Dashboard wonβt start
# Check if port is available
netstat -tulpn | grep :8080
# Try different port
thothctl dashboard launch --port 8081
No data showing
# Generate sample data first
thothctl inventory iac
thothctl scan iac
thothctl check iac -type cost-analysis
thothctl check iac -type drift --recursive
Permission errors
# Check file permissions
ls -la Reports/
chmod 644 Reports/**/*.json
# Enable debug logging
export THOTHCTL_DEBUG=true
thothctl dashboard launch --debug
# Test API endpoints
python test_dashboard.py
# Manual testing
curl http://localhost:8080/api/inventory
curl "http://localhost:8080/api/findings?tool=checkov&severity=high&limit=10"
curl http://localhost:8080/api/sbom
curl http://localhost:8080/api/drift
curl http://localhost:8080/api/ai-usage
# .github/workflows/infrastructure.yml
- name: Generate Reports
run: |
thothctl inventory iac --check-versions
thothctl scan iac
thothctl check iac -type cost-analysis
thothctl check iac -type drift --recursive
- name: Launch Dashboard
run: |
thothctl dashboard launch --no-browser --port 8080 &
sleep 5
curl http://localhost:8080/api/inventory
FROM python:3.12-slim
COPY . /app
WORKDIR /app
RUN pip install -e .
EXPOSE 8080
CMD ["thothctl", "dashboard", "launch", "--host", "0.0.0.0"]
# Health check endpoint
curl -f http://localhost:8080/ || exit 1
# Data freshness check
curl http://localhost:8080/api/refresh