How cloudsecurityalliance/maestro works
MAESTRO Threat Analyzer takes a user-described multi-agent architecture (or a preset), analyzes it across the seven MAESTRO layers, recommends mitigations, and presents progress and results. The main UI also supports executive summaries and generated architecture diagrams. The graph follows the sampled page-to-server-action calls and the action-to-flow calls; the README documents the seven-layer analysis and configurable LLM providers. Some UI and flow internals were not sampled, so those relationships are omitted where not evidenced.
Main entry points: actions.ts Server actions · page.tsx Analysis workflow · genkit.ts Genkit provider setup · sidebar-input-form.tsx Architecture input
Components 16
Input and UI
- Architecture input
src/components/sidebar-input-form.tsx - Use-case presets
src/data/use-cases.ts - Analysis workflow
src/app/page.tsx - Layer results
src/components/layer-card.tsx
Threat Analysis
- MAESTRO layers
src/data/maestro.ts - Server actions
src/app/actions.ts - Layer threat analysis
src/ai/flows/suggest-threats-for-layer.ts
Security Insights
- Mitigation recommendations
src/ai/flows/recommend-mitigations.ts - Executive summary
src/ai/flows/generate-executive-summary.ts - Architecture diagram
src/ai/flows/generate-architecture-diagram.ts - Diagram display
src/components/mermaid-diagram.tsx
AI and Errors
- Genkit provider setup
src/ai/genkit.ts - AI error handling
src/lib/ai-error-handler.ts - Typed errors
src/lib/errors.ts
Other components
- Security practitioner
- Configured LLM
Connections 20
- Security practitioner → Architecture input: describes system
README.md - Architecture input → Use-case presets: offers presets
src/components/sidebar-input-form.tsx - Architecture input → Analysis workflow: submits description
src/app/page.tsx - Analysis workflow → MAESTRO layers: loads layers
src/app/page.tsx - Analysis workflow → Server actions: requests analysis
src/app/page.tsx - Server actions → Layer threat analysis: calls threat flow
src/app/actions.ts - Server actions → Mitigation recommendations: calls mitigation flow
src/app/actions.ts - Server actions → Executive summary: calls summary flow
src/app/actions.ts - Server actions → Architecture diagram: calls diagram flow
src/app/actions.ts - Analysis workflow → Layer results: renders results
src/app/page.tsx - Analysis workflow → Diagram display: presents diagram
src/app/page.tsx - Layer threat analysis → Genkit provider setup: uses AI runtime
src/ai/flows/suggest-threats-for-layer.ts - Mitigation recommendations → Genkit provider setup: uses AI runtime
src/ai/flows/recommend-mitigations.ts - Executive summary → Genkit provider setup: uses AI runtime
src/ai/flows/generate-executive-summary.ts - Architecture diagram → Genkit provider setup: uses AI runtime
src/ai/flows/generate-architecture-diagram.ts - Genkit provider setup → Configured LLM: selects provider
src/ai/genkit.ts - Server actions → AI error handling: normalizes failures
src/app/actions.ts - AI error handling → Typed errors: creates typed errors
src/lib/ai-error-handler.ts - Layer threat analysis → Layer results: returns threats
- Mitigation recommendations → Layer results: returns mitigations