Skip to content

Scopeon-sec/scopeon-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scopeon Server

Enterprise vulnerability management system - Real-time CVE analysis and monitoring platform

Scopeon Server is the central backend service for distributed vulnerability management across networked environments. It provides comprehensive CVE database management, real-time vulnerability analysis, and multi-interface APIs for both automated agents and administrative interfaces.

Key Features

  • Real-time Analysis: Server-Sent Events (SSE) communication with desktop agents for immediate vulnerability detection
  • Comprehensive CVE Database: Automated synchronization with NIST NVD for up-to-date vulnerability data
  • Multi-Interface APIs: REST endpoints for administration, SSE for real-time agent communication
  • Enterprise Security: HTTPS/TLS encryption, session-based authentication, role-based access control
  • Production Ready: Docker deployment, PostgreSQL backend, comprehensive logging and monitoring

Quick Start

Docker Deployment (Recommended)

# Start with Docker Compose
docker-compose -f docker/docker-compose.yml up -d

# Check service status
docker-compose ps

# Initialize CVE database
docker exec scopeon-server ./scopeon-server database populate

# Create admin user
docker exec scopeon-server ./scopeon-server user create-admin

Development Setup

# Build from source
cargo build --release

# Start server
./target/release/scopeon-server server

# Database operations
./target/release/scopeon-server database populate --force
./target/release/scopeon-server user create-admin

Architecture Overview

Scopeon Server implements a distributed architecture with clear separation of concerns:

graph LR
    A[Desktop Agents] --> B[WebSocket API]
    C[Web Dashboard] --> D[REST API]
    B --> E[Application Layer]
    D --> E
    E --> F[PostgreSQL Database]
    G[NVD Sync] --> F
Loading

Core Components

  • SSE API: Real-time server-to-client communication with desktop agents
  • REST API: HTTPS endpoints for web applications and administrative tasks
  • Application Layer: Domain-driven business logic with coordinator patterns
  • Database Layer: PostgreSQL with optimized schemas for vulnerability data
  • External Integration: Automated synchronization with NIST National Vulnerability Database

API Access

REST API

  • Base URL: https://localhost:8080/api/
  • Documentation: https://localhost:8080/swagger-ui/
  • Authentication: Session cookies with role-based permissions

Key Endpoints:

  • /api/health - System health monitoring
  • /api/vulnerabilities - Vulnerability reporting and analysis
  • /api/hosts/{id}/vulnerabilities - Host-specific vulnerability reports

Server-Sent Events API

  • Endpoint: https://localhost:8080/api/sse/events
  • Purpose: Real-time updates to desktop agents
  • Authentication: API key authentication
  • Features: Scan progress, vulnerability alerts, analysis completion

Production Deployment

Docker Configuration

# Production deployment
docker-compose -f docker/docker-compose.yml up -d

# Development with hot reload  
docker-compose -f docker/docker-compose.dev.yml up -d

Environment Configuration

Configure via .env file:

DATABASE_URL=postgresql://user:pass@localhost/scopeon
RUST_LOG=info
TLS_ENABLED=true
CERT_FILE=certs/localhost+2.pem
KEY_FILE=certs/localhost+2-key.pem

Database Management

# Initialize CVE database
./scopeon-server database populate --force

# Update with recent CVE data
./scopeon-server database update

# User management
./scopeon-server user create-admin
./scopeon-server user list

Documentation

Developer Resources

Testing

Scopeon uses a Docker-integrated test data system for deterministic, stable testing:

# Set up test databases with realistic host scenarios and CVE/CPE data
docker-compose -f docker/docker-compose.dev.yml up -d
./docker/scripts/populate_after_start.sh

# Run all tests with realistic data
cargo nextest run

# Run specific test suites
cargo test --test integration
cargo test --test e2e

The system automatically creates:

  • 11 realistic host scenarios for comprehensive E2E testing
  • Real CVE/CPE data from NVD APIs using existing Rust infrastructure
  • Multi-database setup with separate integration and E2E test databases

See Docker README and Testing Documentation for details.

Requirements

  • Rust: 1.70+ (2021 edition)
  • PostgreSQL: 12+
  • Docker: 20.10+ (for containerized deployment)
  • OpenSSL: For TLS support

Contributing

  1. Follow the testing strategy
  2. Maintain documentation standards
  3. Use consistent service patterns
  4. Update OpenAPI specifications with API changes

Built with Rust | Powered by PostgreSQL | Secured with TLS

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages