How garvgupta25/rakshakai works
AgentGuard is a persistent repository-protection control plane. GitHub events enter through Probot, are queued for per-repository analysis, and lead to a pass, safe correction, or block/remediation decision; incidents and repository health remain inspectable. A parallel dependency-graph workflow builds and updates code relationships, then supplies bounded affected context to model analysis and dashboard views. The main worker excerpt shows key orchestration calls; several README-documented capabilities, including correction and operator notifications, have only partial source evidence, so those links are cited to the README.
Main entry points: worker.ts Analysis worker · graph.ts Graph builder · index.ts Probot webhook · incidents.ts Incident records
Components 24
Event intake
- Probot webhook
backend/src/index.ts - Analysis queue
backend/src/queue.ts
Change analysis
- Analysis worker
backend/src/worker.ts - Patch classifier
backend/src/classification.ts - Secret scan sandbox
backend/src/sandbox.ts - Safe correction
backend/src/corrections.ts - Repository context
backend/src/state.ts - Cheap risk model
backend/src/llm.ts - Reasoning model
backend/src/llm.ts
Dependency graph
- Graph builder
backend/src/graph.ts - Graph persistence
backend/src/graph-store.ts
Decisions and response
- Repository state
backend/src/state.ts - Incident records
backend/src/incidents.ts - Credential rotation
backend/src/oidc.ts - Branch rollback
backend/src/remediation.ts
Operations workspace
- Operations dashboard
dashboard/app/dashboard.tsx
Other components
- Repository teams
- GitHub events
- GitHub API
- Groq
- Gemini
- PostgreSQL
- GitHub Checks
- Discord alerts
Connections 27
- Repository teams → GitHub events: pushes changes
README.md - GitHub events → Probot webhook: delivers events
README.md - Probot webhook → Analysis queue: enqueues jobs
backend/src/index.ts - Analysis queue → Analysis worker: dispatches jobs
README.md - Analysis worker → GitHub API: fetches diff
backend/src/worker.ts - Analysis worker → Graph builder: updates graph
backend/src/worker.ts - Analysis worker → Secret scan sandbox: scans patch
backend/src/worker.ts - Analysis worker → Patch classifier: classifies patch
README.md - Analysis worker → Safe correction: requests correction
README.md - Analysis worker → Repository context: gets context
backend/src/worker.ts - Repository context → Graph builder: marks dirty nodes
backend/src/state.ts - Graph builder → Graph persistence: persists graph
backend/src/graph.ts - Graph persistence → PostgreSQL: reads and writes
backend/src/graph-store.ts - Analysis worker → Cheap risk model: requests verdict
backend/src/worker.ts - Cheap risk model → Groq: calls provider
backend/src/llm.ts - Analysis worker → Reasoning model: escalates verdict
backend/src/worker.ts - Reasoning model → Gemini: calls provider
backend/src/llm.ts - Analysis worker → Repository state: updates verdict state
backend/src/worker.ts - Analysis worker → GitHub Checks: sets check result
README.md - Analysis worker → Incident records: records incidents
README.md - Analysis worker → Credential rotation: rotates credentials
backend/src/worker.ts - Analysis worker → Branch rollback: requests rollback
backend/src/worker.ts - Incident records → Discord alerts: notifies operators
README.md - Repository teams → Operations dashboard: reviews outcomes
README.md - Operations dashboard → Incident records: resolves incidents
- Probot webhook → Graph builder: builds initial graph
backend/src/index.ts - GitHub API → Graph builder: provides repository sources