Skip to content

Policy-driven Git repository governance and compliance automation with AI-powered code review, supply chain security, and transparent decision-making through OPA rules and SBOM generation.

Notifications You must be signed in to change notification settings

AvaPrime/gitguard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

48 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ GitGuard

AI-Powered Repository Security & Compliance Platform

Intelligent code analysis, policy enforcement, and security automation for modern development workflows

License: MIT Python 3.9+ Docker Kubernetes Security

GitHub stars GitHub watchers GitHub forks

GitHub release (latest SemVer) GitHub release date Docker Image Size Docker Pulls GitHub Container Registry

CI/CD Release codecov Code Quality

Pages GHCR SBOM Provenance Cosign


🌟 Experience GitGuard Instantly - No Setup Required!

🌐 Live Demo

Launch Demo

Try GitGuard in your browser No installation needed

⚑ One-Click Deploy

Deploy on Railway

Production-ready in 60 seconds Free tier available

πŸ“¦ Quick Install

Download Binary

Pre-built for Linux, Windows, macOS Single executable, no dependencies


GitGuard Hero

Feature Showcase

Why GitGuard?

  • πŸ›‘οΈ Zero-Config Security: Intelligent policies that adapt to your team's workflow
  • 🧠 Org-Brain Intelligence: Dynamic ownership mapping and expertise routing
  • ⚑ Instant Deployment: From zero to protected in under 60 seconds
  • πŸ“Š Full Transparency: Every decision explained with complete audit trails
  • πŸ”„ Temporal Reliability: Bulletproof workflow orchestration with automatic recovery

πŸ“Έ Live Examples

Org-Brain Intelligence in Action

Org-Brain Intelligence Real-time PR digest with relationship mapping and dynamic ownership

Interactive Documentation Portal

Documentation Portal Live policy explorer with GitHub Pages integration

Policy Transparency

Policy Receipt Example Every decision shows complete reasoning and source code

Performance Monitoring

Grafana Dashboard Example P99 latency tracking and merge rate analytics

πŸš€ Try GitGuard Instantly

🌐 Live Demo - No Installation Required!

πŸ‘‰ Launch Interactive Demo - Experience GitGuard in your browser right now!

⚑ One-Click Deployment

Cloud Platforms

Deploy on Railway Deploy to Render

Local Quick Start

# Linux/macOS - One command deployment
curl -fsSL https://raw.githubusercontent.com/codessa-platform/gitguard/main/scripts/quick-deploy.sh | bash

# Windows PowerShell
iwr -useb https://raw.githubusercontent.com/codessa-platform/gitguard/main/scripts/quick-deploy.ps1 | iex

# Docker Compose
git clone https://github.com/codessa-platform/gitguard.git
cd gitguard && docker-compose up -d

πŸ“¦ Binary Installation

Download pre-built binaries from our releases page:

# Linux
wget https://github.com/codessa-platform/gitguard/releases/latest/download/gitguard-linux
chmod +x gitguard-linux && ./gitguard-linux serve --demo

# Windows
# Download gitguard-windows.exe and run: gitguard-windows.exe serve --demo

# macOS
wget https://github.com/codessa-platform/gitguard/releases/latest/download/gitguard-darwin
chmod +x gitguard-darwin && ./gitguard-darwin serve --demo

🎯 GitHub App (60 seconds to protection)

  1. Install: Click β†’ Install GitGuard
  2. Configure: Select repositories β†’ Done! πŸŽ‰
# Verify installation
curl https://api.github.com/repos/YOUR-ORG/YOUR-REPO/hooks
# βœ… GitGuard webhook active

πŸ› οΈ Local Development

# Start GitGuard locally
docker-compose up -d

# 🎭 Demo: Create a test PR and watch the magic
gh pr create --title "feat: add new feature" --body "Testing GitGuard policies"

# πŸ” Watch GitGuard evaluate in real-time
curl http://localhost:8080/api/v1/policies/evaluate | jq '.decision.reasoning'

# πŸ“Š View live dashboard
open http://localhost:3000  # Grafana: P99 latency, merge rates, policy decisions
open http://localhost:8080  # GitGuard: Policy explorer, org-brain insights

✨ Features

🌟 Try Before You Install

  • Live Interactive Demo: Experience GitGuard instantly in your browser
  • One-Click Deployment: Deploy to Railway, Render, or Fly.io in seconds
  • Quick Start Scripts: Single command setup for Linux, macOS, and Windows
  • Pre-built Binaries: Download and run immediately, no dependencies

πŸ”’ Security & Compliance

  • Secret Detection: Multi-layered scanning with entropy analysis
  • Vulnerability Assessment: Real-time CVE matching and CVSS scoring
  • License Compliance: Automated license compatibility checking
  • Supply Chain Security: Dependency graph analysis and risk assessment

πŸ€– AI-Powered Analysis

  • Intelligent Code Review: Context-aware security recommendations
  • Risk Scoring: ML-based threat assessment and prioritization
  • False Positive Reduction: Smart filtering with confidence scoring
  • Adaptive Learning: Continuous improvement from feedback loops

πŸš€ Developer Experience

  • Zero Configuration: Works out-of-the-box with sensible defaults
  • IDE Integration: VS Code, IntelliJ, and Vim plugins available
  • CLI Tools: Comprehensive command-line interface for automation
  • API-First: RESTful APIs for custom integrations

πŸ“Š Observability & Analytics

  • Real-time Dashboards: Live security metrics and trends
  • Custom Alerting: Slack, Teams, PagerDuty integrations
  • Audit Trails: Comprehensive logging for compliance
  • Performance Metrics: P99 latency tracking and merge rate analytics

πŸ’‘ The GitGuard Advantage

Traditional Approach GitGuard Approach
❌ Manual code reviews βœ… AI-powered policy automation
❌ Static CODEOWNERS files βœ… Dynamic org-brain intelligence
❌ Opaque approval processes βœ… Full transparency with receipts
❌ Reactive incident response βœ… Proactive risk prevention
❌ Complex setup and maintenance βœ… Zero-config deployment

🎯 Perfect For

  • 🏒 Enterprise Teams: Scaling code review processes across multiple repositories
  • πŸš€ Fast-Moving Startups: Maintaining quality while shipping quickly
  • πŸ”’ Security-First Orgs: Enforcing compliance without slowing development
  • πŸ“ˆ Growing Teams: Onboarding new developers with intelligent guidance

What you'll see

βœ… Auto-merge for low-risk PRs - Safe changes merge automatically 🚫 Policy transparency with source code - See exact OPA rules and inputs that made decisions πŸ“Š Visual relationship graphs - Mermaid diagrams show file touches and governance connections πŸ‘₯ Always-current ownership index - Dynamic owners list from live graph data πŸ“š Docs portal updating in real-time - Live documentation with policy explanations πŸ”₯ Chaos engineering drills - Automated failure testing validates alert systems πŸ“ˆ SLO monitoring with P99 alerts - Performance tracking ensures system health

Demo Commands

make demo-quick     # 2-min flow: low-risk + security scenarios
make demo-investor  # 5-min flow: low-risk + release-window + dashboard
make demo-customer  # 10-min flow: comprehensive governance demo

What happens on merge?

  1. 🎯 Risk Assessment - AI analyzes code complexity, test coverage, and security impact
  2. πŸšͺ Policy Gate - OPA enforces governance rules with full transparency (see exact rules & inputs)
  3. πŸ“Š Visual Mapping - Mermaid graphs show file relationships and governance connections (≀20 nodes)
  4. πŸ‘₯ Ownership Tracking - Dynamic owners index updates from graph data
  5. πŸ“– Documentation - Codex generates human-readable PR digest with policy explanations
  6. πŸ” Monitoring - SLO alerts track freshness P99 and system health

πŸ“š Comprehensive Documentation

🌟 Live Documentation Portal - Interactive guides with live examples

πŸ“– Core Guides

πŸ”§ Advanced Topics

🎯 Specialized Resources

πŸš€ Quick Links

πŸ”Œ MCP Sidecar Integration (Optional Developer Enhancement)

GitGuard includes an optional MCP (Model Context Protocol) sidecar for enhanced developer experience with Claude Desktop integration.

Features:

  • Policy Explanation: Get detailed explanations of Rego rules and policy decisions
  • Interactive Policy Exploration: Query policy logic directly from Claude Desktop
  • Seamless Integration: Works alongside existing GitGuard workflows

Quick Setup:

  1. Configure Claude Desktop:

    # Copy the provided configuration
    cp claude_desktop_config.json ~/.config/claude_desktop/config.json
  2. Install MCP Server Dependencies:

    pip install -r mcp/requirements.txt
  3. Set Environment Variables:

    export GITGUARD_REPO_PATH="/path/to/your/repo"
    export GITGUARD_POLICIES_DIR="/path/to/gitguard/policies"
    export GITGUARD_API_BASE_URL="http://localhost:8000"
  4. Test Integration:

    # Verify MCP server is working
    python -m mcp.servers.gitguard_policy

Available MCP Functions:

  • get_rego_rule(rule_name) - Retrieve specific OPA policy rules with explanations
  • render_policy_block(pr_number) - Visualize policy evaluation results for a PR

Usage in Claude Desktop:

  • Ask: "Explain the critical-files policy rule"
  • Ask: "Show me why PR #123 was blocked"
  • Ask: "What are the current release window policies?"

Note: The MCP sidecar is an additive feature that enhances the developer experience without affecting GitGuard's core functionality. GitGuard remains the authoritative system for all policy decisions and repository governance.

Architecture

GitGuard consists of several components working together:

  • guard-api: Receives GitHub webhooks, normalizes events, forwards to Codex
  • codex: Writes PR digests to docs_src/, triggers MkDocs build
  • OPA: Policy decisions for merge/tag (release windows, infra reviews, deps)
  • Temporal/NATS: Workflow orchestration and event streaming
  • Prometheus/Grafana: Observability - scrapes services, shows merge rates, block reasons, revert rate
  • CI: Lint, tests, SBOM; sets checks signals for OPA input

Flow: PR β†’ CI artifacts β†’ risk compute β†’ OPA gate β†’ (merge|block) β†’ Codex doc β†’ dashboards

See ARCHITECTURE.md for detailed system design and data flows.

Contributing

  • Branch from main, name feat|fix|chore/<scope>-<slug>
  • Conventional Commits; squash merge only
  • Run locally: make setup && make up
  • Tests: pytest -q (aim for coverage deltas β‰₯ -0.2%)
  • Policy changes require a docs page under docs_src/policies/

See CONTRIBUTING.md for detailed guidelines and DEVELOPER_GUIDE.md for setup instructions.

Support

License

MIT License - see LICENSE for details.


GitGuard - Your repositories, under guard. πŸ›‘οΈ

About

Policy-driven Git repository governance and compliance automation with AI-powered code review, supply chain security, and transparent decision-making through OPA rules and SBOM generation.

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 2

  •  
  •