Categorygithub.com/Dr-Lazarus/VirusScanGateway
repository
0.0.0-20240509111052-7a94dbeb8532
Repository: https://github.com/dr-lazarus/virusscangateway.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

Notice: This project is archived and no longer actively maintained.

VirusScanGateway

  • example workflow
  • example workflow

VirusScanGateway is a Go-based web server designed to facilitate the secure uploading and scanning of files for viruses and malware. It integrates with the VirusTotal API to provide real-time scanning results, which are then stored and displayed from a PostgreSQL database.

Features

  • File upload and secure storage of results in PostGre SQL DB.
  • Real-time virus and malware scanning using VirusTotal API.
  • Hosted on EC2 with custom domain: www.virusscanapi.lat
  • Domain secured with HTTPs.
  • Connected to AWS RDS.
  • CI/CD Pipeline Production: Commits to Main will be automatically deployed to AWS EC2 Container.
  • CI/CD Pipeline Development: Commits (Non-Main) and PRs will be automatically tested in a custom testing environment.
  • Comprehensive Integration testing suite to test endpoints.
  • AWS Secrets Manager to manage production environment key-value pairs.
  • AWS Route 53 to provide authoritative NS and a hosted DNS Zone for www.virusscanapi.lat

AWS Cloud Architecture

image

CI - Dev

  • Any commits to non-main branches will trigger a workflow which runs 3 integration tests.

How to develop

To install VirusScanGateway, follow these steps:

  1. Clone the repository:
git clone https://github.com/yourusername/VirusScanGateway.git
cd VirusScanGateway
  1. Start your PostGreSQL Instance on Local
  2. Modify .env.dev file to comment CI/CD and uncomment local
# DEV ENVIRONMENT (LOCAL) 
 DATABASE_URL=postgres://cloudsine:[email protected]:5432/VirusScanGatewayDB?sslmode=disable
 VIRUSTOTAL_API_KEY=Your-Test-API-Key
 ENVIRONMENT=DEV

# DEV ENVIRONMENT (CI/CD)
DATABASE_URL=postgresql://postgres:password@db:5432/postgres?sslmode=disable
VIRUSTOTAL_API_KEY=Your-Test-API-Key
ENVIRONMENT=DEV
  1. Run the container:
docker-compose -f docker-compose-dev-local.yml build
docker-compose -f docker-compose-dev-local.yml up
  1. Server started on localhost:8080

Prerequisites

Before you begin, ensure you have met the following requirements:

  • You have installed Docker and Docker Compose.
  • You have a VirusTotal API key. If you don't have one, you can register for an API key at VirusTotal.

Usage

Once the application is running, you can upload files to be scanned via the provided web interface at http://localhost:8080.

Results from the scans will be available in the web interface, and stored in the PostgreSQL database for future reference.

Development

To set up a development environment for contributing to VirusScanGateway, you can use the following additional steps:

  1. Install Go locally on your machine.
  2. Install a PostgreSQL database and configure it according to the application's requirements.

For local development, you can run the server directly using:

make start

Make sure your local environment variables are set according to the .env.dev file.

License

Distributed under the MIT License. See LICENSE for more information.