Skip to content

Mkp-dev-portefolio/cybersecurity-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

 β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— 
 β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—
 β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—   β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
 β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β•šβ–ˆβ–ˆβ•”β•  β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•    β•šβ–ˆβ–ˆβ•”β•  β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—
 β–ˆβ–ˆβ•‘ β•šβ•β• β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘
 β•šβ•β•     β•šβ•β•   β•šβ•β•   β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β•β•   β•šβ•β•   β•šβ•β•     β•šβ•β•  β•šβ•β•β•šβ•β•β•šβ•β•  β•šβ•β•
                                                                            
           β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—    β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— 
          β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—
          β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘
          β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘
          β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•‘     β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
          β•šβ•β•  β•šβ•β•β•šβ•β•    β•šβ•β•      β•šβ•β•β•β•β•β•  β•šβ•β•β•β•šβ•β•β• β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β• 
                                                                                   
             β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—    β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—
             β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•
             β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘ β–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• 
             β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•— 
             β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ•β• β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•—
             β•šβ•β•     β•šβ•β•  β•šβ•β•β•šβ•β•    β•šβ•β•     β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•šβ•β•     β•šβ•β•β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•šβ•β•β•  β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•

 ╔═══════════════════════════════════════════════════════════════════════════╗
 β•‘  πŸš€ AI-Powered Cybersecurity Framework with PKI & MCP Integration        β•‘
 β•‘                                                                           β•‘
 β•‘  πŸ” Build intelligent security agents in minutes                         β•‘
 β•‘  πŸ›‘οΈ  Complete PKI infrastructure & certificate management                β•‘
 β•‘  πŸ€– Model Context Protocol (MCP) integration                             β•‘
 β•‘  πŸ“¦ Docker deployment & CI/CD ready                                      β•‘
 β•‘                                                                           β•‘
 β•‘  Version: v1.0.0 | License: MIT | Framework: Python 3.9+                β•‘
 β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

License: MIT Python 3.9+ Version Docker CI/CD

πŸ”₯ Get Started in 10 Minutes | πŸ“š Documentation | 🐳 Docker Setup


🌟 Overview

A comprehensive cybersecurity framework built with AI agents, PKI infrastructure, and Model Context Protocol (MCP) integration.

Features

  • AI-Powered Security Agents: Intelligent agents for PKI management, vulnerability assessment, and security analysis
  • PKI Infrastructure: Complete Public Key Infrastructure with certificate lifecycle management
  • MCP Integration: Model Context Protocol server for seamless AI tool integration
  • Docker Deployment: Containerized deployment with Docker Compose
  • Comprehensive Testing: Integration tests for all components
  • Scalable Architecture: Modular design supporting multiple security domains

Architecture

The framework consists of several key components:

Core Components

  1. AI Agents (agents/)

    • Base agent framework with memory and tool registry
    • PKI-specific agent for certificate management
    • Extensible architecture for additional security domains
  2. Infrastructure (infrastructure/)

    • MCP server for AI tool integration
    • PostgreSQL database for data persistence
    • Docker Compose orchestration
    • Vault integration for secrets management
  3. Compose for Agents (compose-for-agents/)

    • Collection of pre-built agent frameworks
    • Support for multiple AI frameworks (LangGraph, CrewAI, etc.)
    • Ready-to-use agent templates

πŸš€ Quick Start

New Users: Start Here!

πŸ‘‰ QUICKSTART GUIDE - Build your first security agent in 10 minutes!

The quickstart guide will walk you through:

  • βœ… Setting up your first agent (5 minutes)
  • βœ… Running interactive network scans
  • βœ… Understanding the framework architecture
  • βœ… Building custom security tools

Full Framework Setup

For advanced users who want the complete infrastructure:

Prerequisites

  • Docker and Docker Compose
  • Python 3.11+ (for development)
  • Git

Installation

  1. Clone the repository:
git clone https://github.com/Mkp-dev-portefolio/cybersecurity-framework.git
cd cybersecurity-framework
  1. Quick demo (recommended for first-time users):
# Install minimal dependencies
pip install -r requirements-quickstart.txt

# Run the interactive quickstart
python run_quickstart.py
  1. Full setup (for development):
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate

# Install all dependencies
pip install -r requirements.txt

# Start all services
docker-compose -f infrastructure/docker-compose.yml up -d

# Run tests
pytest tests/test_mcp_integration.py -v

Usage

PKI Agent

The PKI agent provides comprehensive certificate management capabilities:

from agents.pki.pki_agent import PKIAgent

# Initialize the agent
agent = PKIAgent()

# Issue a certificate
cert_request = {
    "common_name": "example.com",
    "organization": "My Organization",
    "country": "US"
}

certificate = agent.issue_certificate(cert_request)
print(f"Certificate issued: {certificate['serial_number']}")

MCP Server

The MCP server provides AI tools for security operations:

# Start the MCP server
cd infrastructure/mcp-server
python src/main.py

# The server will be available at http://localhost:8080

Docker Deployment

Deploy the entire framework using Docker Compose:

# Deploy all services
docker-compose -f infrastructure/docker-compose.yml up -d

# Scale specific services
docker-compose -f infrastructure/docker-compose.yml up -d --scale mcp-server=3

# View logs
docker-compose -f infrastructure/docker-compose.yml logs -f mcp-server

Development

Project Structure

cybersecurity-framework/
β”œβ”€β”€ agents/                 # AI agents
β”‚   β”œβ”€β”€ base/              # Base agent framework
β”‚   └── pki/               # PKI-specific agent
β”œβ”€β”€ infrastructure/        # Core infrastructure
β”‚   β”œβ”€β”€ docker-compose.yml # Service orchestration
β”‚   β”œβ”€β”€ mcp-server/        # MCP server implementation
β”‚   └── postgres/          # Database configuration
β”œβ”€β”€ compose-for-agents/    # Agent frameworks collection
β”œβ”€β”€ tests/                 # Integration tests
β”œβ”€β”€ framework-structure.md # Architecture documentation
└── README.md             # This file

Adding New Agents

  1. Create a new agent directory under agents/
  2. Implement the agent class inheriting from BaseAgent
  3. Add tools and capabilities specific to your domain
  4. Update the tool registry
  5. Add tests for the new agent

Running Tests

# Run all tests
pytest tests/ -v

# Run specific test file
pytest tests/test_mcp_integration.py -v

# Run with coverage
pytest tests/ --cov=agents --cov=infrastructure

Configuration

Environment Variables

Create a .env file in the root directory:

# Database
POSTGRES_DB=cybersecurity_db
POSTGRES_USER=cyber_user
POSTGRES_PASSWORD=secure_password

# MCP Server
MCP_SERVER_PORT=8080
MCP_SERVER_HOST=0.0.0.0

# Vault (if using)
VAULT_ADDR=http://localhost:8200
VAULT_TOKEN=your_vault_token

Service Configuration

Each service can be configured through environment variables or configuration files:

  • MCP Server: infrastructure/mcp-server/src/config.py
  • Database: infrastructure/postgres/init.sql
  • Agents: Individual agent configuration files

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow PEP 8 style guidelines
  • Add tests for new features
  • Update documentation for API changes
  • Use type hints where appropriate
  • Add docstrings for all functions and classes

Security Considerations

  • All sensitive data is encrypted at rest
  • Certificate private keys are stored securely
  • API endpoints are protected with authentication
  • Regular security audits are performed
  • Secrets are managed through environment variables

License

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

Support

For support and questions:

  • Open an issue on GitHub
  • Check the documentation in framework-structure.md
  • Review the test cases for usage examples

Roadmap

  • Additional AI agent types (vulnerability scanning, compliance checking)
  • Web UI for agent management
  • Advanced analytics and reporting
  • Integration with external security tools
  • Multi-tenant support
  • Enhanced monitoring and alerting

Acknowledgments

  • Built with Model Context Protocol (MCP)
  • Uses Docker for containerization
  • Leverages modern AI frameworks
  • Incorporates security best practices