How shahebaz2210/codesentinel works
CodeSentinel is a DevSecOps security platform: teams connect GitHub repositories, trigger scans from the UI or pull-request events, then review prioritized findings and remediation. Its scan pipeline runs static and secret analysis, enriches findings with repository context and security knowledge, applies AI assessment and policy gates, and reports results to GitHub and the dashboard. The README documents dashboard, audit, RBAC, RAG, and PR feedback capabilities; their detailed wiring is not fully visible in sampled source, so only documented relationships are shown.
Main entry points: scan_pipeline.py Scan pipeline · v1 API routes · github.py GitHub integration · webhooks.py Webhook endpoint
Components 26
Web experience
- Web application
frontend/app - API client
frontend/lib/api.ts
API and integrations
- FastAPI application
backend/app/main.py - API routes
backend/app/api/v1 - Repository management
backend/app/services/repository.py - Webhook endpoint
backend/app/api/v1/webhooks.py - Webhook processing
backend/app/services/webhook.py - Scan requests
backend/app/services/scan.py - GitHub integration
backend/app/services/github.py - Audit logging
backend/app/services/audit.py - Dashboard metrics
backend/app/services/dashboard.py
Scanning workflow
- Scan worker
backend/app/workers/scan_worker.py - Scan pipeline
backend/app/workers/scan_pipeline.py - SAST and secret scanners
backend/app/scanners - Code context
backend/app/ai/context_builder.py - Finding management
backend/app/services/finding.py - Risk scoring
backend/app/services/risk.py - Policy gates
backend/app/services/policy.py
Security intelligence
- Knowledge retrieval
backend/app/services/intelligence.py - Knowledge embeddings
backend/app/services/embeddings.py - AI assessment
backend/app/services/ai_assessment.py
Platform state
- Redis job queue
backend/app/core/redis.py - PostgreSQL and pgvector
backend/app/core/database.py
Other components
- Engineering team
- Google Gemini
- GitHub
Connections 30
- Engineering team → Web application: uses
- Web application → API client: requests data
- API client → FastAPI application: REST calls
- FastAPI application → API routes: dispatches
- API routes → Repository management: manages repositories
- API routes → Scan requests: triggers scans
- API routes → Webhook endpoint: routes webhooks
- Webhook endpoint → Webhook processing: passes event
- GitHub → Webhook endpoint: sends events
- Webhook processing → Scan requests: triggers PR scan
- Repository management → GitHub integration: fetches repositories
- GitHub integration → GitHub: GitHub API
- Scan requests → Redis job queue: enqueues job
- Redis job queue → Scan worker: dispatches job
- Scan worker → Scan pipeline: runs scan
- Scan pipeline → SAST and secret scanners: runs analysis
- Scan pipeline → Code context: extracts context
- Scan pipeline → Knowledge retrieval: retrieves knowledge
- Scan pipeline → AI assessment: assesses findings
- AI assessment → Google Gemini: requests assessment
- Scan pipeline → Policy gates: evaluates gates
- Scan pipeline → Risk scoring: scores risk
- Scan pipeline → Finding management: records findings
- Knowledge retrieval → PostgreSQL and pgvector: queries vectors
- Knowledge embeddings → PostgreSQL and pgvector: stores vectors
- Scan pipeline → PostgreSQL and pgvector: persists scan results
- API routes → Dashboard metrics: requests metrics
- API routes → Audit logging: requests audit data
- Scan pipeline → GitHub integration: posts PR feedback
- GitHub integration → GitHub: posts checks and comments