Skip to content

rramesh17993/Cerberus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Cerberus

The Context-Aware Vulnerability Orchestrator based on the SecureScan Framework.

License Python Node.js Docker Security

Cerberus is a production-grade vulnerability management platform designed to solve Alert Fatigue. Unlike traditional scanners that dump thousands of findings, Cerberus uses a Context Engine to correlate vulnerabilities with runtime context, environment criticality, and reachability.

The Problem: 5,000 "Critical" bugs, but only 5 matter. The Solution: Cerberus tells you which 5 matter.

Live Demo

SecureScan Dashboard

Key Differentiators

Context-Aware Prioritization

Cerberus doesn't just scan code; it understands it.

  • Environment Weighting: A bug in prod > a bug in dev.
  • Reachability Analysis: Is the vulnerable function actually called?
  • Public Exposure: Is the service internet-facing?

Unified Orchestration

Run the best-in-class tools under one roof.

  • SAST: Semgrep
  • SCA: Trivy
  • DAST: OWASP ZAP
  • Secrets: Gitleaks
  • IaC: Checkov

Developer Experience

  • VS Code Extension: Real-time security linting
  • CLI Tool: cerberus scan --context=prod --reachability=true
  • Modern Dashboard: React-based vulnerability management
  • API-First: RESTful APIs with OpenAPI docs

Architecture Overview

Detailed Architecture

For comprehensive diagrams including System Overview, Scan Workflows, and Authentication Flows, please see docs/ARCHITECTURE.md.

graph TD
    CLI[Cerberus CLI] --> Gateway[API Gateway]
    Web[Web Dashboard] --> Gateway
    Gateway --> API[FastAPI Backend]
    
    API --> Auth[Auth Service]
    API --> DB[(PostgreSQL)]
    
    subgraph "The Brain"
        Engine[Context Engine]
        Policy[Policy Manager]
    end
    
    API <--> Engine
    
    API --> Queue[Redis Queue]
    Queue --> Workers[Celery Workers]
    Workers --> Scanners[Scanner Engines]
    
    Scanners --> Results[(Scan Results)]
    Results --> Engine
Loading

Quick Start

Prerequisites

# Required
- Docker & Docker Compose
- Python 3.10+
- Node.js 18+
- Git

# Optional
- VS Code (for extension)
- Kubernetes (for production)

1. Clone & Setup

git clone https://github.com/yourusername/securescan-framework.git
cd securescan-framework

# Start infrastructure
docker-compose up -d

# Install dependencies
make install

# Run migrations
make migrate

# Start all services
make dev

2. Access Components

# Web Dashboard
open http://localhost:3000

# API Documentation
open http://localhost:8000/docs

# CLI Tool
securescan scan --path ./examples/vulnerable-app

3. Run Your First Scan

# Using CLI
securescan scan \
  --path ./examples/vulnerable-app \
  --scanners semgrep,trivy \
  --output sarif

# Using API
curl -X POST http://localhost:8000/api/v1/scan \
  -H "Authorization: Bearer $(cat .env | grep API_KEY | cut -d= -f2)" \
  -H "Content-Type: application/json" \
  -d '{
    "project_name": "my-app",
    "repo_url": "https://github.com/user/vulnerable-app",
    "scanners": ["semgrep", "trivy"]
  }'

๐Ÿ“ฆ Project Structure

securescan-framework/
โ”œโ”€โ”€ ๐Ÿ“ backend/                    # FastAPI Backend
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ api/                   # REST API endpoints
โ”‚   โ”‚   โ”œโ”€โ”€ core/                  # Core services & config
โ”‚   โ”‚   โ”œโ”€โ”€ db/                    # Database models & migrations
โ”‚   โ”‚   โ”œโ”€โ”€ scanners/              # Scanner integrations
โ”‚   โ”‚   โ””โ”€โ”€ workers/               # Celery background tasks
โ”‚   โ”œโ”€โ”€ tests/                     # Backend tests
โ”‚   โ””โ”€โ”€ requirements.txt
โ”œโ”€โ”€ ๐Ÿ“ frontend/                   # React Dashboard
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/            # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ pages/                 # Dashboard pages
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/                 # Custom React hooks
โ”‚   โ”‚   โ””โ”€โ”€ services/              # API clients
โ”‚   โ”œโ”€โ”€ tests/                     # Frontend tests
โ”‚   โ””โ”€โ”€ package.json
โ”œโ”€โ”€ ๐Ÿ“ cli/                        # Python CLI Tool
โ”‚   โ”œโ”€โ”€ securescan/
โ”‚   โ”‚   โ”œโ”€โ”€ commands/              # CLI commands
โ”‚   โ”‚   โ”œโ”€โ”€ core/                  # Core CLI logic
โ”‚   โ”‚   โ””โ”€โ”€ scanners/              # Scanner interfaces
โ”‚   โ”œโ”€โ”€ tests/                     # CLI tests
โ”‚   โ””โ”€โ”€ setup.py
โ”œโ”€โ”€ ๐Ÿ“ vscode-extension/           # VS Code Extension
โ”‚   โ”œโ”€โ”€ src/                       # TypeScript source
โ”‚   โ”œโ”€โ”€ resources/                 # Extension assets
โ”‚   โ””โ”€โ”€ package.json
โ”œโ”€โ”€ ๐Ÿ“ infrastructure/             # Deployment configs
โ”‚   โ”œโ”€โ”€ docker/                    # Docker configurations
โ”‚   โ”œโ”€โ”€ kubernetes/                # K8s manifests
โ”‚   โ””โ”€โ”€ terraform/                 # Infrastructure as Code
โ”œโ”€โ”€ ๐Ÿ“ docs/                       # Documentation
โ”‚   โ”œโ”€โ”€ api/                       # API documentation
โ”‚   โ”œโ”€โ”€ guides/                    # User guides
โ”‚   โ””โ”€โ”€ architecture/              # Technical docs
โ”œโ”€โ”€ ๐Ÿ“ examples/                   # Example projects
โ”‚   โ”œโ”€โ”€ vulnerable-app/            # Test application
โ”‚   โ””โ”€โ”€ ci-cd-configs/             # CI/CD examples
โ”œโ”€โ”€ ๐Ÿ“ scripts/                    # Development scripts
โ”œโ”€โ”€ docker-compose.yml             # Local development
โ”œโ”€โ”€ Makefile                       # Development commands
โ””โ”€โ”€ README.md                      # This file

๐Ÿ”ง Development Setup

Backend Development

cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-dev.txt

# Run backend
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

# Run tests
pytest tests/ -v

Frontend Development

cd frontend
npm install
npm run dev

# Run tests
npm test
npm run test:e2e

CLI Development

cd cli
npm install
npm run build

# Link for local development
npm link

# Test CLI
securescan --help
securescan scan --path ../examples/vulnerable-app

VS Code Extension Development

cd vscode-extension
npm install
npm run compile

# Test extension
code --extensionDevelopmentPath=$(pwd) ../examples/vulnerable-app

๐Ÿงช Testing

Run All Tests

make test

Individual Test Suites

# Backend tests
cd backend && pytest tests/ -v --cov=app

# Frontend tests
cd frontend && npm test -- --coverage

# CLI tests
cd cli && python -m pytest tests/

# Integration tests
python scripts/run_integration_tests.py

# E2E tests
npm run test:e2e

๐Ÿš€ Deployment

Development (Docker Compose)

docker-compose up -d

Production (Kubernetes)

# Deploy to Kubernetes
kubectl apply -f infrastructure/kubernetes/

# Or use Helm
helm install securescan infrastructure/helm/

Cloud Deployment

# AWS EKS
terraform apply infrastructure/terraform/aws/

# GCP GKE
terraform apply infrastructure/terraform/gcp/

# Azure AKS
terraform apply infrastructure/terraform/azure/

๐Ÿ“Š Monitoring & Observability

Metrics

Logging

  • Structured logging with JSON format
  • Centralized logs with ELK stack
  • Audit trails for all security operations

Health Checks

# API Health
curl http://localhost:8000/health

# Scanner Health
curl http://localhost:8000/api/v1/scanners/health

# Database Health
curl http://localhost:8000/api/v1/health/db

๐Ÿ”’ Security

Authentication

  • JWT tokens for API access
  • API keys for CLI/CI-CD integration
  • RBAC for fine-grained permissions

Secure Configuration

# Generate secure secrets
python scripts/generate_secrets.py

# Validate security config
securescan config validate

# Security audit
make security-audit

๐Ÿ“ˆ Performance

Benchmarks

  • Scan Speed: 100K LOC in < 3 minutes
  • Concurrent Scans: 10+ parallel scans
  • API Throughput: 1000+ requests/second
  • Dashboard Load: < 2 second initial load

Optimization

  • Async processing with Celery
  • Caching with Redis
  • Database indexing for fast queries
  • CDN integration for static assets

๐Ÿค Contributing

Development Workflow

  1. Fork the repository
  2. Create a feature branch
  3. Write tests for your changes
  4. Implement the feature
  5. Run the test suite
  6. Submit a pull request

Code Standards

  • Backend (Python): Black formatting, flake8 linting
  • Frontend/CLI (TypeScript): Prettier formatting, ESLint
  • Git: Conventional commits
  • Documentation: Keep docs updated

๐Ÿ“š Documentation

๐ŸŽฏ Roadmap

โœ… Phase 1: MVP (Current)

  • Core API with 3 scanners
  • CLI tool
  • Basic dashboard
  • Docker deployment

๐Ÿšง Phase 2: Enhancement (Q1 2026)

  • VS Code extension
  • 5+ additional scanners
  • Advanced analytics
  • Policy engine

๐Ÿ”ฎ Phase 3: Enterprise (Q2 2026)

  • SSO integration
  • Compliance reporting
  • Multi-tenant support
  • Enterprise connectors

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Security Tools: Semgrep, Trivy, OWASP ZAP, Gitleaks, Checkov
  • SARIF Standard: Microsoft Security Static Analysis Results Format
  • Open Source Community: All the amazing contributors

๐Ÿ“ž Support


โญ Star this repo if you find it useful!

Made with โค๏ธ by the SecureScan community

About

comprehensive, open-source security scanning and vulnerability management platform that orchestrates multiple security scanners to provide unified security testing capabilities

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors