Skip to content

eashanroy7/webapp-cve-processor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CVE Processor Application

Part of Cloud-Native CVE Processing System

This repository contains the CVE Processor microservice, a core component of a comprehensive, scalable cloud-native system for processing and querying CVE (Common Vulnerabilities and Exposures) data. The complete system leverages Kubernetes, microservices architecture, Kafka messaging, and an LLM-powered RAG application to deliver intelligent CVE insights.

System Overview: The end-to-end solution continuously monitors the official CVE GitHub repository, processes new releases, stores data in PostgreSQL, and provides an AI-powered question-answering interface. Built on AWS EKS with Infrastructure-as-Code (Terraform), the system features automated CI/CD pipelines, service mesh security (Istio), comprehensive monitoring (Prometheus/Grafana), and centralized logging (FluentBit/CloudWatch).

Architecture

Architecture Diagram

About This Service

The CVE Processor is a Go application that:

  • Downloads and extracts CVE JSON files from the CVEProject repository
  • Processes CVE data and publishes messages to Kafka topics
  • Integrates with Flyway for database schema migrations
  • Runs as a containerized Kubernetes Job triggered by a custom Kubernetes Operator

Related Repositories

This project is part of a complete microservices ecosystem:

Core Services

Kubernetes Operator

Infrastructure

Observability & Scaling

LLM Application


Prerequisites

Before you begin, ensure you have the following installed on your local machine:

Ensure the GOPATH and GOROOT environment variables are set according to your Go installation.

Building the Application

  1. Clone the repository:

    git clone https://github.com/eashanroy7/webapp-cve-processor.git
    cd webapp-cve-processor
  2. Set up environment variables:

    # Copy the .env.example to .env and adjust the database connection strings and other configurations as necessary
    cp .env.example .env
  3. Install dependencies:

    go mod tidy
  4. Build the application:

    go build -o cve-processor ./cmd

Running the Application

  1. Database Setup:

    • Start your PostgreSQL server and create a database named cve.
    • Modify the flyway.conf to match your database connection details.
  2. Run Database Migrations:

    • Navigate to the migrations directory.
    • Execute Flyway migrations to set up your database schema:
    flyway migrate
  3. Run the application:

    ./cve-processor

This command starts the CVE Processor, which will begin processing the CVE JSON files from the specified directory.

Additional Information

  1. Directory Structure: The cmd directory contains the main application logic. The pkg directory includes essential packages for CVE processing.

  2. Deployment: In production, this application runs as a Kubernetes Job triggered by the custom CVE Operator when new CVE releases are detected.

  3. CI/CD: Automated pipelines via Jenkins build multi-architecture Docker images (ARM/x86) with semantic versioning.

Technology Stack

  • Language: Go (Golang)
  • Messaging: Kafka
  • Database: PostgreSQL with Flyway migrations
  • Containerization: Docker
  • Orchestration: Kubernetes (AWS EKS)
  • Infrastructure: Terraform, Helm

Support

For support, please submit an issue on GitHub.

About

A distributed system built with Go and Kafka that ingests real-time CVE data; uses Kafka partitioning for horizontal scaling; vectorizes it in RAG as external memory for the LLM and provides security insights about software

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors