Skip to content

evetsydrah/blob-scan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blob Scanning with Azure Function Trigger

This project is created to enable the uploading of file into Azure Blob Storage with the scanning capabilities. The Azure Function integrated with ClamAV and triggered when file is uploaded into the blob storage.

This project also using Azure Bicep - IaC to automate the provisioning of the Azure Services.

Getting Started

Prerequisites :

  1. Azure Subscription
  2. Install Azure CLI
  3. Install Bicep CLI
  4. .NET 6.0 SDK installed

Deployment Steps

  1. Clone the repository into your local environment.

  2. Create Azure Resource Group under Azure Subscription.

    az group create --name <resource-group-name> --location eastus
    
  3. Go to the deploy folder.

  4. Run the following Bicep command to provision the required services

    az deployment group create --resource-group <resource-group-name> --template-file main.bicep
    
  5. Verify that all the resources have been created. You will be able to see the following resrouces created.

    1. Storage Account
      • Go to the stroage account starting with prefix "betablob" and click on Containers. Verify the 3 containers have been created.
    2. Azure Function
    3. App Service Plan
    4. Azure Container Instances
    5. Application Insights
  6. Copy the connection string from Azure Storage Account and modify in Azure Function

    1. Go to the Storage Account with prefix "betablob" and select Access Keys.
    2. Go to Azure Function Configuration and replace the value of "blobmonitorconnstring"
  7. Go to src folder and deploy Azure Function to the Azure Function created on step 4.

Testing

  1. Go to Azure Storage Account and explore UploadBlob folder.
  2. Upload any file into the folder and Azure Function will be triggered for scanning and move to the corresponding folder.

Reference

About

Scanning of blob storage with AV to quarantine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published