How jojohere05/pbl-2 works
FinGuard scans uploaded or GitHub-hosted repositories, combines secret, dependency, and Terraform findings, evaluates risk, and returns explanations and reports. The API exposes scan, dashboard, feedback, and live-update routes; a separate CLI provides a standalone scan workflow. GitHub App processing is an additional integration branch. The graph follows documented capabilities and indexed references; some API internals and feedback wiring were not shown, so uncertain connections are omitted or marked unverified.
Main entry points: scan.py Scan API · api/main.py API Application · finguard/main.py CLI Scanner · orchestrator_agent.py Scan Orchestrator
Components 29
Entry Points
- API Application
api/main.py - Scan API
api/routes/scan.py - Dashboard API
api/routes/dashboard.py - Feedback API
api/routes/feedback.py - Live Updates
api/routes/ws.py - CLI Scanner
finguard/main.py
Scanning and Analysis
- Context Classifier
api/context_classifier.py - Scan Runner
api/adk_agents/runner.py - Scan Orchestrator
api/adk_agents/orchestrator_agent.py - Dependency Scanner
api/adk_agents/dependency_agent.py - Terraform Scanner
api/adk_agents/terraform_agent.py - Secret Scanner
api/adk_agents - CLI Orchestrator
finguard/agents/orchestrator.py - CLI Dependency Scanner
finguard/agents/dependency_agent.py - CLI Terraform Scanner
finguard/agents/terraform_agent.py - CLI Secret Scanner
finguard/agents
Results and Learning
- Risk Engine
api/risk_engine.py - Finding Explainer
api/rag/explainer.py - Rule Retriever
api/rag/retriever.py - PDF Reports
api/report/pdf_generator.py - Scan Database
api/database.py - CLI Risk Engine
finguard/risk_engine.py - CLI Explainer
finguard/rag/explainer.py - CLI Rule Retriever
finguard/rag/retriever.py
GitHub Integration
- GitHub Webhook
api/github_app/webhook_handler.py - Background Worker
api/github_app/background_worker.py - GitHub Client
api/github_app/github_client.py
Other components
- User
- GitHub
Connections 32
- User → API Application: uses
README.md - API Application → Scan API: routes requests
api/main.py - API Application → Dashboard API: routes requests
api/main.py - API Application → Feedback API: routes requests
api/main.py - API Application → Live Updates: routes connections
api/main.py - Scan API → Context Classifier: classifies context
api/routes/scan.py - Scan API → Scan Runner: runs scan
api/routes/scan.py - Scan Runner → Scan Orchestrator: invokes
api/adk_agents/runner.py - Scan Orchestrator → Dependency Scanner: dispatches
api/adk_agents/orchestrator_agent.py - Scan Orchestrator → Terraform Scanner: dispatches
api/adk_agents/orchestrator_agent.py - Scan Orchestrator → Secret Scanner: dispatches
api/adk_agents/orchestrator_agent.py - Scan API → Risk Engine: scores findings
api/routes/scan.py - Scan API → Finding Explainer: explains findings
api/routes/scan.py - Finding Explainer → Rule Retriever: retrieves rules
api/rag/explainer.py - Scan API → PDF Reports: generates report
api/routes/scan.py - Scan API → Scan Database: saves scans
api/routes/scan.py - Dashboard API → Scan Database: reads summaries
api/routes/dashboard.py - Scan API → Live Updates: publishes progress
api/routes/scan.py - User → CLI Scanner: runs scan
README.md - CLI Scanner → CLI Orchestrator: coordinates scan
finguard/main.py - CLI Orchestrator → CLI Dependency Scanner: dispatches
finguard/agents/orchestrator.py - CLI Orchestrator → CLI Terraform Scanner: dispatches
finguard/agents/orchestrator.py - CLI Orchestrator → CLI Secret Scanner: dispatches
finguard/agents/orchestrator.py - CLI Scanner → CLI Risk Engine: scores findings
finguard/main.py - CLI Scanner → CLI Explainer: explains findings
finguard/main.py - CLI Explainer → CLI Rule Retriever: retrieves rules
finguard/rag/explainer.py - GitHub → GitHub Webhook: sends events
README.md - GitHub Webhook → Background Worker: queues scans
api/github_app/webhook_handler.py - Background Worker → Scan Runner: runs scan
api/github_app/background_worker.py - Background Worker → GitHub Client: updates checks
api/github_app/background_worker.py - GitHub Client → GitHub: calls API
api/github_app/github_client.py - Feedback API → Risk Engine: updates weights