An agentic, pre-deployment risk gating and security intelligence platform that intercepts GitHub push events, runs multi-dimensional parallel AI audits, and computes automated release decision scorecards before code reaches production.
DeployGuard is an autonomous DevSecOps control plane designed to eliminate high-risk production outages and credential leaks. By analyzing incoming pull requests and commits across static code vulnerabilities, infrastructure-as-code drift, and vector similarity against historical incidents, DeployGuard provides real-time risk gating with sub-second aggregation and explainable verdict scorecards.
- Problem Statement
- Solution
- Key Features
- Screenshots
- Architecture
- System Workflow
- Tech Stack
- Frontend Features
- Backend Architecture
- API Overview
- Project Structure
- Installation
- Environment Variables
- Demo Walkthrough
- Current Implementation Status
- Future Improvements
- Contributing
- License
Modern software delivery relies on high-velocity Continuous Integration & Continuous Deployment (CI/CD) pipelines. However, traditional security practices create severe operational bottlenecks:
- Slow Manual Reviews: Senior engineers spend hours manually inspecting diffs for security risks, API key leaks, and configuration drifts.
- Late Security Scanning: Vulnerabilities are caught post-deployment or late in staging, increasing remediation costs.
- Infrastructure Misconfigurations: Minor Kubernetes or Terraform configuration drifts bypass code linting and trigger service downtime in production.
- Ignored Outage History: Teams rarely cross-reference current pull requests against past post-mortems and root-cause reports, causing recurring outage patterns.
- Lack of Centralized Deployment Intelligence: Platform teams lack a single operational view into deployment risk trends across microservices.
DeployGuard was built to solve these problems by automating pre-deployment risk gating through parallel AI agents and vector search.
DeployGuard introduces a real-time risk evaluation pipeline that intercepts GitHub webhook events before code promotion:
[ GitHub Push Webhook ]
β
βΌ
[ API Gateway Ingress (8000) ]
β
βΌ
[ Kafka Message Event Bus ]
β
βββββββ΄ββββββββββββββββββββ¬ββββββββββββββββββββββββββ
βΌ βΌ βΌ
[ Code Risk Agent ] [ Infra Risk Agent ] [ Incident History Agent ]
(LLM Code Audit) (IaC Drift Scanner) (Qdrant Vector Lookup)
β β β
βββββββ¬ββββββββββββββββββββ΄ββββββββββββββββββββββββββ
βΌ
[ Decision Aggregator (8002) ] βββΊ [ Redis State Store (6379) ]
β
βΌ
[ Operations Dashboard (3000) ]
- Ingress Event Capture: GitHub webhook payloads are validated by the API Gateway and queued in Kafka.
- Parallel Agent Evaluation: Specialized microservices execute independent risk scans concurrently.
- Synthesis & Gating: The Aggregator service collects agent findings, computes normalized risk scores (0β100) and confidence indices, and enforces release policies (
SAFE,REVIEW, orBLOCK). - Operational Visibility: Results stream to the Executive Dashboard for instant operational awareness.
- π€ Multi-Agent AI Risk Assessment: Independent micro-agents specialize in static code auditing, infrastructure drift analysis, and incident correlation.
- β‘ Asynchronous Event Processing: Built on Apache Kafka to handle high-throughput deployment webhooks asynchronously without blocking developers.
- π§ Historical Incident Intelligence: Semantic vector search matching proposed commits against a 50+ curated historical outage dataset using sentence-transformers and Qdrant.
- π¦ Repository Context Indexing: Deep semantic indexing of repository files, symbols, frameworks, and lines of code.
- π Semantic Code Search: Natural language vector query engine to discover patterns, classes, and logic across indexed repositories.
- π‘οΈ Infrastructure Security Analysis: Automated scanning of Kubernetes manifests and Terraform configurations for root privileges, open ports, and resource drifts.
- π Real-time Operations Dashboard: Polished operational view featuring 60-minute deployment windows, system health monitors, and live activity streams.
- π DevSecOps Analytics: Time-series volume metrics, decision distribution charts, and risk histogram trends (7d / 14d / 30d / 90d).
- π§ͺ Webhook Simulator: Built-in developer tool to simulate safe, warning, and critical GitHub push events with real-time pipeline execution tracking.
- π Compliance Report Generation: Exportable DevSecOps summaries and raw pipeline registries in CSV and JSON formats.
- π Reactive Real-time Alerts: Non-blocking toast notifications for high-risk blocked deployments.
The following diagram illustrates the complete DeployGuard distributed system architecture:
flowchart TD
subgraph Ingress Layer
GH[GitHub Webhook / Client] -->|POST /webhook/github| GW[API Gateway Proxy :8000]
end
subgraph Messaging & Bus
GW -->|Produce deployment-events| KAFKA[Apache Kafka Broker :9092]
end
subgraph Parallel AI Risk Agents
KAFKA -->|Consume| CRA[Code Risk Agent]
KAFKA -->|Consume| IRA[Infra Risk Agent]
KAFKA -->|Consume| IHA[Incident History Agent]
CRA -->|LLM Prompt Audit| GEMINI[Google Gemini API]
IRA -->|Heuristics & LLM Audit| GEMINI
IHA -->|Vector Search| QDRANT[(Qdrant Vector DB :6333)]
end
subgraph Aggregation & Persistence
CRA -->|Produce agent-results| KAFKA
IRA -->|Produce agent-results| KAFKA
IHA -->|Produce agent-results| KAFKA
KAFKA -->|Consume findings| AGG[Decision Aggregator :8002]
AGG <--->|State & Metrics Cache| REDIS[(Redis Cache :6379)]
RCS[Repo Context Service :8003] <--->|Indexed Vector Chunks| QDRANT
RCS <--->|Metadata Cache| REDIS
end
subgraph Frontend Control Plane
FE[Vite / React Dashboard :3000] -->|REST API| AGG
FE -->|REST API| RCS
FE -->|REST API| GW
end
1. Webhook Ingress βββΊ 2. Event Streaming βββΊ 3. Parallel Scanning βββΊ 4. Vector Lookup
(Gateway validates) (Kafka topic produce) (Code & Infra agents) (Qdrant incident match)
β
8. History Archive βββ 7. UI Dashboard βββ 6. Policy Decision βββ 5. Score Aggregation
(Permanent storage) (React live view) (SAFE / REVIEW / BLOCK) (Aggregator synthesis)
- Webhook Ingress: Developer pushes code or opens a Pull Request on GitHub. GitHub fires a webhook payload to API Gateway (
:8000). - Event Streaming: Gateway parses and validates payload headers, wraps the payload in a
DeploymentEvent, and publishes it to Kafka'sdeployment-eventstopic. - Parallel Scanning:
- Code Risk Agent extracts modified file diffs and prompts Gemini 2.5 Flash to detect credential leaks and code defects.
- Infra Risk Agent analyzes Kubernetes and IaC files for privilege escalation and security drifts.
- Vector Lookup: Incident History Agent embeds commit text using sentence-transformers and executes vector cosine similarity queries against Qdrant (
:6333) to discover past outage parallels. - Score Aggregation: Aggregator (
:8002) consumes all agent findings, normalizes scores to a 0β100 scale, and computes an overall confidence index. - Policy Decision: If
overall_score >= 60, verdict is set toBLOCK; ifoverall_score >= 30, verdict is set toREVIEW; otherwiseSAFE. - UI Updates: Decision is saved to Redis (
:6379). Frontend (:3000) polls aggregator state and reactively updates dashboard cards and toast notifications. - Permanent History: The deployment evaluation record is stored permanently for auditing and analytics analytics.
| Component | Technology | Description |
|---|---|---|
| Framework | React 18 | UI component architecture |
| Tooling | Vite 8 | Lightning-fast build tool & dev server |
| Language | TypeScript 5.8 | Type-safe application development |
| State & Query | TanStack React Query v5 | Server-state caching and refetching |
| Routing | React Router v7 | Single-page application client routing |
| Icons & Visuals | Lucide React & Recharts | Premium icon system & vector charts |
| Styling | Vanilla CSS3 | Custom HSL tokenized dark glassmorphism system |
| Component | Technology | Description |
|---|---|---|
| Language | Python 3.11 | Core backend language |
| Framework | FastAPI & Uvicorn | High-performance asynchronous REST APIs |
| Data Validation | Pydantic v2 | Strict schema validation |
| Event Bus | Apache Kafka | Distributed message streaming broker |
| Caching & State | Redis 7 | In-memory decision cache & metrics store |
| Vector DB | Qdrant | High-performance vector database |
| Embeddings | Sentence-Transformers | Local text embedding generation (all-MiniLM-L6-v2) |
| Component | Technology | Description |
|---|---|---|
| LLM Provider | Google Gemini API | Advanced reasoning model |
| LLM Model | Gemini 2.5 Flash | Sub-second risk scoring & explainable reasoning |
| Component | Technology | Description |
|---|---|---|
| Containerization | Docker & Docker Compose | Multi-container service orchestration |
| Web Server | Nginx | Reverse proxy for frontend assets |
- ποΈ Dashboard (
/): Operational hub featuring a 6-card Executive Summary, a focal Latest Deployment Decisions table (filtered to 60-minute windows), Repository Context metadata, Pipeline System Health, Live Recent Activity feed, and AI Agent Fleet overview. - π Deployments (
/deployments): Full deployment audit table with search by repository or ID, filter dropdowns (Decision, Severity, Branch), pagination, correlation ID copying, and JSON data exports. - π Deployment Details (
/deployments/:id): Deep inspection view rendering overall risk score bar, confidence displays, free-text AI intelligence summary, collapsible per-agent findings, correlated repository evidence snippets, raw decision JSON viewer, and step-by-step audit timelines. - π Analytics (
/analytics): DevSecOps analytics center rendering time-range selectors (7d/14d/30d/90d), daily deployment volume bar charts, decision distribution pie charts, risk score trend area charts, severity filterable block logs, and CSV data export downloads. - π€ AI Agents (
/agents): Agent fleet monitoring page detailing active worker counts, fleet average confidence, total evaluation metrics, per-agent hardware load (CPU, RAM, uptime, latency), and sample console log streams. - π₯ Incidents (
/incidents): Historical Incident Intelligence dashboard rendering an expandable outage database (Root Cause, AI Summary, Resolution, Rollback Status) alongside a semantic vector similarity search playground. - β‘ System Health (
/system-health): Pipeline infrastructure health page tracking real-time status of Gateway, Aggregator, Kafka, Redis, and Qdrant service nodes, latency metrics, and network orchestration telemetry. - π§ͺ Webhook Simulator (
/simulator): Developer testbed to trigger simulated GitHub webhook pushes with pre-loaded templates (Safe, Warning, Critical) and real-time execution progress tracking. - π Reports (
/reports): Compliance export hub offering report templates (Executive Summary, Agent Reliability, Raw JSON) with customizable time windows and automated browser downloads. - βοΈ Settings (
/settings): Session policy configurator with interactive sliders for Auto-Block threshold scores, Review limits, agent timeouts, Slack/Email alert toggles, and visual theme preferences. - π Repository Search (
/search): Natural language semantic code search querying Qdrant vector space across indexed repository chunks, highlighting file paths, line ranges, and similarity scores. - βΉοΈ About (
/about): Architecture documentation page rendering platform concepts, visual ASCII pipeline flowcharts, sub-agent security profiles, and tech stack references.
DeployGuard Microservices
βββ Gateway Proxy (:8000) ββ Ingress validation & Kafka event publishing
βββ Aggregator Engine (:8002) ββ Decisions compilation, Redis state & metrics
βββ Repository Context Service (:8003) ββ Vector indexing, chunking & semantic search
βββ Code Risk Agent ββ Static diff scanning & Gemini security audit
βββ Infra Risk Agent ββ IaC drift detection & Gemini security audit
βββ Incident History Agent ββ Qdrant vector embedding & outage matching
- Ingress gateway for external webhooks.
- Validates GitHub webhook signatures and payload contracts.
- Wraps incoming events into standard
DeploymentEventschemas and produces them to Kafka.
- Central decision engine of DeployGuard.
- Consumes agent evaluation findings from Kafka topics.
- Synthesizes risk scores into final decisions (
SAFE,REVIEW,BLOCK). - Manages 60-minute window metric filters and persists state to Redis.
- Serves REST endpoints for frontend dashboard queries.
- Indexes repository source files, generates line chunks, and computes vector embeddings.
- Stores vector payloads in Qdrant and caches metadata in Redis.
- Exposes semantic search endpoints for code lookup and evidence retrieval.
- Code Risk Agent: Scans pull request title, body, commit message, and modified diffs for security bugs and exposed secrets using Google Gemini API.
- Infra Risk Agent: Scans Kubernetes YAML and Terraform configs for security misconfigurations and root privilege escalations using Google Gemini API.
- Incident History Agent: Computes vector embeddings using
sentence-transformersand queries Qdrant to find matching historical outages.
POST /webhook/githubβ Webhook ingress endpoint for GitHub push events.
GET /healthβ Aggregator health check.GET /deploymentsβ Paginated list of deployment evaluation records.GET /deployments/metricsβ Aggregate pipeline metrics (total, safe, review, blocked, avgRisk, avgConfidence).GET /decision/{correlation_id}β Fetch single deployment verdict or pending evaluation status.GET /agents/statusβ Agent fleet health, latency, analysis counts, and confidence averages.
GET /repository/status/{repo}/{branch}β Indexing status of a repository branch.GET /repository/stats/{repo}/{branch}β File counts and lines of code statistics.GET /repository/manifest/{repo}/{branch}β Detected frameworks and last indexed timestamp.POST /repository/searchβ Vector search over indexed codebase chunks.
GET /analytics/summaryβ High-level DevSecOps analytics statistics.GET /analytics/volumeβ Daily volume time-series metrics.GET /analytics/decisionsβ Decision breakdown distribution percentages.GET /analytics/blocksβ Filtered log of blocked deployments.GET /analytics/exportβ Download CSV or JSON analytics export.GET /incidentsβ Curated historical incident dataset.POST /incidents/similarityβ Perform vector similarity lookup for commit text against historical incidents.
DeployGuard/
βββ agent-code-risk/ # Code Risk AI Agent (FastAPI + Gemini)
βββ agent-infra-risk/ # Infra Risk AI Agent (FastAPI + Gemini)
βββ agent-incident-history/ # Incident History Agent (FastAPI + Qdrant)
β βββ incident_seeding/ # Curated 50+ incident dataset & embeddings
βββ aggregator/ # Decision Aggregator Service & REST API
βββ gateway/ # GitHub Webhook Ingress Gateway Proxy
βββ repository-context-service/ # Code Indexing & Semantic Vector Search
βββ frontend/ # Vite + React + TypeScript Dashboard
β βββ src/
β β βββ api/ # Type-safe Axios client modules
β β βββ components/ # Shared UI components (MetricCard, StatusBadge, etc.)
β β βββ pages/ # 12 Application pages
β β βββ utils/ # Confidence normalization & time helpers
β βββ public/ # Static branding assets
β βββ package.json
βββ docker-compose.yml # Multi-container orchestration specification
βββ .env.example # Environment template
βββ README.md # Project documentation
- Docker & Docker Compose: Docker Desktop 4.20+ or Docker Engine 24.0+
- Node.js: v18.0+ (if running frontend locally outside Docker)
- Python: 3.11+ (if running backend services locally outside Docker)
- Google Gemini API Key: Free or paid API key from Google AI Studio
git clone https://github.com/shriza1991/DeployGuard.git
cd DeployGuardCopy .env.example to .env and set your Gemini API key:
cp .env.example .envEdit .env:
GEMINI_API_KEY=your_actual_gemini_api_key_here
GEMINI_MODEL=gemini-2.5-flashdocker-compose up --build -dVerify that all containers are healthy:
docker-compose ps| Variable | Required | Default | Description |
|---|---|---|---|
GEMINI_API_KEY |
Yes | β | API key for Google Gemini LLM security audits |
GEMINI_MODEL |
No | gemini-2.5-flash |
Gemini model variant to use |
KAFKA_BROKER |
No | kafka:9092 |
Bootstrap address for Kafka broker |
REDIS_URL |
No | redis://redis:6379/0 |
Connection URI for Redis cache |
QDRANT_URL |
No | http://qdrant:6333 |
Connection URL for Qdrant Vector Database |
Follow this step-by-step walkthrough to demonstrate DeployGuard during a presentation:
- Start Services: Launch all microservices using
docker-compose up --build -d. - Open Dashboard: Navigate to
http://localhost:3000in your browser to view the Operations Center. Observe that all services display ONLINE. - Open Webhook Simulator: Click Simulator in the sidebar navigation (
http://localhost:3000/simulator). - Load Critical Preset: Click the π΄ Load Critical Preset button. Notice the form fills with a high-risk PR (
hotfix: disable security policies temporarily). - Trigger Simulation: Click Send GitHub Webhook Push Event. Observe the live stage execution progress bar evaluating Kafka delivery, Code Risk, Infra Risk, Incident History, and Aggregator decision.
- Inspect Verdict: Upon completion, you will be automatically redirected to the Deployment Details page (
/deployments/:id). Inspect theBLOCKverdict badge, overall risk score (80+), AI risk summary, and individual agent scores. - View Incidents Intelligence: Open Incidents (
/incidents) to browse the 50+ outage database and test vector similarity matching against custom commit descriptions. - Explore Analytics: Navigate to Analytics (
/analytics) to review volume trends, decision distribution pie charts, and export a CSV report. - Semantic Search: Navigate to Repo Search (
/search) and type"Redis client initialization"to query indexed code chunks.
- Operations Center Dashboard: Executive summary cards, focal deployment table, pipeline health grid, live activity stream.
- Deployment Audit Archive: Paginated list of deployments with multi-field search and filters.
- Deployment Details: Full single-deployment breakdown with agent scores, evidence snippets, raw JSON, and timeline.
- DevSecOps Analytics: Interactive charts for deployment volume, decision distribution, and risk histograms with CSV exports.
- AI Agent Monitoring: Real-time worker fleet health, latencies, analysis counts, and sample log output streams.
- Incident Intelligence: Outage database browser with expandable details and vector similarity matching against Qdrant.
- Webhook Simulator: Interactive testbed with pre-loaded presets and pipeline evaluation tracking.
- Semantic Code Search: Qdrant-backed natural language search over indexed codebase chunks.
- Compliance Reports: Downloadable CSV and JSON report exports.
- Repository Context: Automated indexing of file counts, LOC, frameworks, and last indexed timestamps.
- Pipeline System Health: Real-time monitoring of Gateway, Aggregator, Kafka, Redis, and Qdrant service nodes.
- π Live Streaming Agent Logs: WebSockets / Server-Sent Events (SSE) integration for streaming real-time agent execution logs.
- π Authentication & RBAC: User authentication, team workspaces, and role-based access control (Admin, SRE, Developer).
- π GitHub App Integration: Direct integration as an official GitHub App to automatically post check runs and PR comments.
- β‘ Multi-Repository Indexing: Concurrent indexing for multi-repo enterprise microservice architectures.
- π Custom Policy Engine: Configurable OPA / Rego policy rules for enterprise-specific risk gating thresholds.
Contributions are welcome! Please follow these steps:
- Fork the repository (
https://github.com/shriza1991/DeployGuard/fork). - Create a feature branch (
git checkout -b feature/amazing-feature). - Commit your changes (
git commit -m 'feat: add amazing feature'). - Push to the branch (
git push origin feature/amazing-feature). - Open a Pull Request.
This project is licensed under the MIT License β see the LICENSE file for details.



