How sharone-12/failsafeai works
FailSafe AI accepts a GitHub repository, streams a multi-stage AI code review, and presents findings, exploit scenarios, and suggested patches. The graph separates the browser workflow, API/auth boundary, repository-context preparation, and analysis/report stages. Backend implementation detail is sampled only in part; pipeline sequencing and several capabilities are therefore represented from the README, not treated as inspected source.
Main entry points: AnalysisPanel.jsx Live report panel · useSSEAnalysis.js SSE analysis state · app.py FastAPI service · App.jsx Application shell
Components 22
Browser experience
- Application shell
frontend/src/App.jsx - Repository input
frontend/src/components/RepoInput.jsx - Live report panel
frontend/src/components/AnalysisPanel.jsx - Agent status cards
frontend/src/components/AgentCards.jsx - Bug findings
frontend/src/components/ResultTabs/BugsTab.jsx - Vulnerability findings
frontend/src/components/ResultTabs/VulnsTab.jsx - Attack timelines
frontend/src/components/ResultTabs/AttacksTab.jsx - Suggested fixes
frontend/src/components/ResultTabs/FixesTab.jsx - Scan summary
frontend/src/components/SummaryCard.jsx - SSE analysis state
frontend/src/hooks/useSSEAnalysis.js - GitHub auth state
frontend/src/hooks/useGithubAuth.js
API and identity
- FastAPI service
app.py - Serverless entry
api/index.py
Repository context
- Fetch repository files
app.py - Chunk and build context
app.py
Analysis and results
- Bug detection
app.py - Vulnerability scan
app.py - Attack simulation
app.py - Fix generation
app.py
Other components
- Developer
- GitHub API
- LLM provider
Connections 28
- Developer → Repository input: enters repository
README.md - Application shell → Repository input: renders
- Application shell → SSE analysis state: starts analysis
frontend/src/App.jsx - Application shell → GitHub auth state: uses auth state
frontend/src/App.jsx - Repository input → SSE analysis state: submits URL
- SSE analysis state → FastAPI service: opens SSE stream
README.md - GitHub auth state → FastAPI service: uses auth routes
README.md - Serverless entry → FastAPI service: imports app
api/index.py - FastAPI service → Fetch repository files: runs pipeline
app.py - Fetch repository files → GitHub API: fetches repo tree
app.py - Fetch repository files → Chunk and build context: passes source files
README.md - Chunk and build context → Bug detection: provides code context
README.md - Chunk and build context → Vulnerability scan: provides code context
README.md - Bug detection → LLM provider: requests analysis
README.md - Vulnerability scan → LLM provider: requests analysis
README.md - Vulnerability scan → Attack simulation: supplies findings
README.md - Chunk and build context → Attack simulation: grounds scenarios
README.md - Bug detection → Fix generation: supplies bug findings
README.md - Vulnerability scan → Fix generation: supplies vulnerabilities
README.md - Fix generation → LLM provider: requests patches
README.md - FastAPI service → SSE analysis state: streams stage results
README.md - SSE analysis state → Live report panel: provides live state
frontend/src/App.jsx - Live report panel → Agent status cards: renders status
frontend/src/components/AnalysisPanel.jsx - Live report panel → Bug findings: renders findings
frontend/src/components/AnalysisPanel.jsx - Live report panel → Vulnerability findings: renders findings
frontend/src/components/AnalysisPanel.jsx - Live report panel → Attack timelines: renders timelines
frontend/src/components/AnalysisPanel.jsx - Live report panel → Suggested fixes: renders patches
frontend/src/components/AnalysisPanel.jsx - Live report panel → Scan summary: renders summary
frontend/src/components/AnalysisPanel.jsx