Skip to content

Autonomous AI-powered Cybersecurity Platform. A polyglot (Rust/Go/Python/React) agentic system for real-time network scanning, vulnerability analysis, and remediation orchestration.

Notifications You must be signed in to change notification settings

csa7mdm/Cypersecurity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

πŸ›‘οΈ Cybersecurity Agent Platform

Cybersecurity Agent Platform Preview

License Architecture AI-Powered Enterprise

Enterprise-grade, AI-powered cybersecurity platform for autonomous network scanning, vulnerability analysis, and threat intelligence. Built with multi-tenancy, cryptographic compliance, and production-ready Kubernetes infrastructure.


πŸ“– Table of Contents


🌟 Overview

A production-ready SaaS platform combining high-performance Rust scanners, AI-driven analysis, and enterprise-grade security features. Designed for MSPs, security teams, and compliance-focused organizations.

Core Capabilities

  • πŸ€– AI-Driven Analysis: Advanced threat intelligence using OpenRouter and Gemini
  • 🏒 Multi-Tenant Architecture: Complete isolation with Organizations and Teams
  • πŸ” Enterprise RBAC: 4-role permission system (Owner/Admin/Scanner/Viewer)
  • πŸ“Š Professional Reporting: PDF/HTML generation with risk scoring
  • βš–οΈ Compliance Ready: Cryptographic audit trails and authorization workflows
  • ☸️ Cloud Native: Kubernetes deployment with auto-scaling
  • πŸ“ˆ Production Observability: Prometheus metrics and structured logging

🏒 Enterprise Features

Multi-Tenancy & RBAC

  • Organizations: Isolated tenants with dedicated resources
  • Teams: Sub-groups within organizations
  • Row-Level Security: PostgreSQL RLS for data isolation
  • Permission System: Granular access control across all API endpoints

Compliance & Safety

  • Cryptographic Audit Signing: Ed25519 signatures on all audit logs
  • Permission to Scan: Document-based authorization workflow
  • Emergency Kill Switch: Platform-wide scan halt capability
  • Audit Log Export: Regulatory compliance export API

Infrastructure

  • Kubernetes Deployment: Production-ready manifests
  • Horizontal Pod Autoscaling: 2-40 pods based on load
  • Celery Workers: Distributed task processing
  • Redis Queue: Job distribution and caching
  • Prometheus Metrics: 15+ business and system metrics

πŸ—οΈ Architecture

graph TB
    subgraph "Frontend"
        UI[React Dashboard]
    end
    
    subgraph "API Layer"
        GW[Go Gateway<br/>Load Balancer]
        RBAC[RBAC Middleware]
    end
    
    subgraph "Services"
        BRAIN[Python Brain<br/>AI Analysis]
        CORE[Rust Scanners]
        CELERY[Celery Workers<br/>Async Tasks]
    end
    
    subgraph "Data & Queue"
        DB[(PostgreSQL<br/>Multi-tenant)]
        REDIS[(Redis<br/>Queue/Cache)]
    end
    
    subgraph "External"
        AI[OpenRouter API]
    end
    
    UI <-->|REST/WebSocket| GW
    GW <--> RBAC
    RBAC <-->|REST| BRAIN
    RBAC <-->|gRPC| CORE
    GW <--> DB
    GW <--> REDIS
    BRAIN <--> AI
    CELERY <--> REDIS
    CELERY <--> DB
    
    style GW fill:#4CAF50
    style BRAIN fill:#2196F3
    style CORE fill:#FF5722
    style DB fill:#9C27B0
Loading

Data Flow

  1. User Request β†’ Gateway (auth + RBAC)
  2. Scan Job β†’ Celery Queue β†’ Worker β†’ Core Scanner
  3. Results β†’ Brain (AI analysis)
  4. Report β†’ PDF Generation β†’ Storage
  5. Audit β†’ Cryptographic signing β†’ PostgreSQL

πŸ› οΈ Technology Stack

Layer Technology Purpose
Frontend React, Chart.js Real-time dashboard
Gateway Go, Gin, gRPC API gateway, RBAC
Brain Python, OpenAI SDK AI analysis, reporting
Scanners Rust, Tokio High-performance scanning
Workers Celery, Redis Distributed task processing
Database PostgreSQL 15 Multi-tenant data with RLS
Queue Redis 7 Job distribution, caching
Observability Prometheus, JSON logs Metrics and monitoring
Deployment Kubernetes, Docker Container orchestration

πŸš€ Quick Start

Prerequisites

  • Docker & Docker Compose
  • Kubernetes cluster (for production)
  • OpenRouter API key

Local Development

# Clone repository
git clone https://github.com/csa7mdm/Cypersecurity.git
cd Cypersecurity

# Set environment variables
cp .env.example .env
# Edit .env with your API keys

# Start services
docker-compose up -d

# Access dashboard
open http://localhost:3000

Kubernetes Deployment

# Create namespace
kubectl apply -f k8s/namespace.yaml

# Deploy infrastructure
kubectl apply -f k8s/postgres.yaml
kubectl apply -f k8s/redis.yaml

# Deploy services
kubectl apply -f k8s/brain.yaml
kubectl apply -f k8s/gateway.yaml
kubectl apply -f k8s/celery-worker.yaml

# Check status
kubectl get pods -n cypersecurity

See k8s/README.md for detailed deployment guide.


🚧 Development Roadmap

Current Status: Phase 4 (Product Functionality)

Completed βœ…:

  • Enterprise architecture (multi-tenancy, RBAC, compliance)
  • Kubernetes deployment infrastructure
  • Professional reporting engine
  • Cryptographic audit trails
  • Nmap Scanner Integration (18 tests, TDD approach)
  • Stripe Billing System (15 tests, subscription management)
  • Email Notifications (12 tests, user engagement)
  • OWASP ZAP Scanner (14 tests, web vulnerabilities)
  • CVE/NVD Intelligence (12 tests, threat enrichment)

In Progress πŸ”„:

  • OWASP ZAP integration (web vulnerability scanning)
  • CVE database integration
  • Billing system (Stripe)

Next Up πŸ“‹:

  • Email notifications
  • User onboarding flow
  • Complete test coverage (80%+ target)
  • CI/CD pipeline

Product Development Phases

Phase Status Features Timeline
Phase 1-3 βœ… Complete Architecture, Multi-tenancy, K8s Done
Phase 4 πŸ”„ Active Scanners, Billing, Tests 8 weeks
Phase 5 πŸ“‹ Planned Onboarding, Docs, UX 4 weeks
Phase 6 πŸ“‹ Planned Quality, CI/CD 4 weeks
Phase 7 πŸ“‹ Planned Analytics, Optimization 2 weeks

Priority Features (P0):

  1. βœ… Nmap Integration - COMPLETE
  2. βœ… Stripe Billing - COMPLETE
  3. πŸ”„ OWASP ZAP Integration - Next
  4. πŸ“‹ Email Notifications - Next

See implementation_plan.md for detailed roadmap.


πŸ“‘ API Documentation

Key Endpoints

Authentication

  • POST /api/v1/auth/register - User registration
  • POST /api/v1/auth/login - User login

Organizations

  • POST /api/v1/organizations - Create organization
  • GET /api/v1/organizations - List user's organizations
  • POST /api/v1/organizations/:id/invite - Invite user (Admin)

Scanning

  • POST /api/v1/scans - Create scan (requires authorization)
  • GET /api/v1/scans - List scans
  • POST /api/v1/scans/:id/report - Generate report

Compliance

  • POST /api/v1/scan-authorizations - Submit authorization
  • POST /api/v1/scan-authorizations/:id/verify - Approve/reject (Admin)
  • POST /api/v1/emergency/stop - Emergency stop (Owner only)
  • GET /api/v1/audit/export - Export audit logs

Observability

  • GET /health - Health check
  • GET /metrics - Prometheus metrics

Full API documentation: API_CONTRACTS.md


☸️ Deployment

Scaling Configuration

  • Gateway: 3-20 replicas
  • Brain: 2-10 replicas
  • Celery Workers: 3-20 replicas
  • Auto-scaling: Based on CPU (70%) and memory (80%)

Resource Requirements

Component CPU Request Memory Request CPU Limit Memory Limit
Gateway 100m 256Mi 500m 1Gi
Brain 250m 512Mi 1000m 2Gi
Celery Worker 250m 512Mi 1000m 2Gi
PostgreSQL 250m 512Mi 1000m 2Gi

Monitoring

# View metrics
kubectl port-forward -n cypersecurity svc/gateway 8080:8080
curl http://localhost:8080/metrics

# View logs
kubectl logs -n cypersecurity deployment/gateway -f

πŸ”’ Security & Compliance

Data Protection

  • Encryption: TLS 1.3 for all communications
  • Row-Level Security: PostgreSQL RLS for data isolation
  • Audit Logging: Ed25519 cryptographic signatures
  • Secrets Management: Kubernetes Secrets

Compliance Features

  • SOC 2 Ready: Complete audit trail
  • GDPR Compliant: Data isolation and export
  • Authorization Workflow: Legal proof of permission
  • Emergency Controls: Immediate platform shutdown

Best Practices

  • Regular security audits
  • Principle of least privilege
  • Immutable infrastructure
  • Automated vulnerability scanning

πŸ“Š Performance

  • Scan Processing: 1000+ concurrent scans
  • API Throughput: 10,000 req/sec
  • Auto-scaling: Sub-minute response
  • Report Generation: <5s for standard reports

πŸ“– Documentation


🀝 Contributing

We welcome contributions! Please see our contributing guidelines.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

πŸ“œ License

MIT License - see LICENSE for details.


πŸ”— Links


Built with ❀️ for enterprise security teams

About

Autonomous AI-powered Cybersecurity Platform. A polyglot (Rust/Go/Python/React) agentic system for real-time network scanning, vulnerability analysis, and remediation orchestration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published