Skip to content

CordGuard/cordguard-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛡️ CordGuard - Backend

CordGuard Logo

FastAPI Python AWS License

A distributed malware analysis system with secure file analysis through REST API

Getting StartedFeaturesArchitectureAPI ReferenceSecurity


📋 Table of Contents


🚀 Getting Started

Prerequisites

  • Python 3.8+
  • SurrealDB
  • AWS S3 compatible storage
  • Requires environment variables (see below)

Quick Start

  1. Clone the repository:

    git clone https://github.com/cordguard/cordguard.git
    cd cordguard
  2. Set up your environment variables:

    cp .env.example .env
  3. Install dependencies:

    pip install -r requirements.txt
  4. Run the application:

    python app.py

d

✨ Features

🔍 Advanced Analysis

  • Static and dynamic malware analysis
  • Supports multiple file formats
  • Extracts file metadata dynamically
  • Distributed processing across VM workers

🏗️ Robust Architecture

  • FastAPI-powered REST API
  • S3 integration for secure storage
  • SurrealDB for data persistence
  • Asynchronous task processing

🔐 Security First

  • Ed25519 cryptographic signatures
  • Secure file handling
  • Memory-safe operations
  • Path traversal prevention

🔒 Security

Cryptographic Security

  • Ed25519 signatures for worker authentication
  • Secure key management
  • PEM format key storage

File Safety

  • Secure file uploads
  • Validation and deduplication before analysis

🛠️ Development

Environment Variables

AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_ENDPOINT_URL_S3=your_s3_endpoint
AWS_REGION=your_region
BUCKET_NAME_S3=your_bucket_name

OPENAI_API_KEY=your_openai_api_key

SURREALDB_USERNAME=your_surrealdb_username
SURREALDB_PASSWORD=your_surrealdb_password
SURREALDB_URL=your_surrealdb_url

REGISTRY_HOST=
API_HOST=
WORKER_HOST=
AI_API_HOST=
USERS_HOST=
API_KEY=
WORKER_API_KEY=
REGISTRY_API_KEY=
AI_API_KEY=

PORT=

🤝 Contributing

We eagerly await your contributions! Please read our Contributing Guide for more details.

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

📄 License

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

👥 Team

🚀 Deployment

Deploy with Fly.io:

fly deploy

🙏 Acknowledgments

  • SurrealDB
  • FastAPI
  • AWS S3
  • Tigirs Storage
  • Fly.io

Made with ❤️ by the CordGuard Team

WebsiteDocumentationReport Bug

About

The RESTful API of the CordGuard project.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •