/bucket-virus-scanner

Serverless Virus Scanning Process using VirusTotal on GCP Cloud Functions

Primary LanguageHCL

bucket-virus-scanner

This project is a serverless process using GCP Cloud Functions that scan files uploaded to a GCP bucket for viruses using VirusTotal. The scanning process will be triggered when a new file is uploaded to the specified GCP bucket and the dangerous files are deleted.

Prerequisites

Implementation

  1. Implement a GCP Cloud Function that triggers on a new file upload to the specified GCP bucket (google.cloud.storage.object.v1.finalized)

  2. Fetch the VirusTotal API Key securely from GCP Secret Manager within the Cloud Function as an Environment variable

Or

  • Clone this git repository

    git clone https://github.com/Raz-Dahan/bucket-virus-scanner.git
    cd ./bucket-virus-scanner
  • Change relevant variables in main.tf

  • Deploy on GCP using Terraform

    cd ./terraform
    terraform init
    terraform plan

    And, if suitable for your requirements, proceed to

    terraform apply

Resources