{"id":18349248,"url":"https://github.com/pvarentsov/virus-scanner","last_synced_at":"2025-04-06T09:32:01.231Z","repository":{"id":37885373,"uuid":"217847835","full_name":"pvarentsov/virus-scanner","owner":"pvarentsov","description":"Virus scanner microservice based on ClamAV and NodeJS.","archived":false,"fork":false,"pushed_at":"2023-01-11T22:45:10.000Z","size":3676,"stargazers_count":28,"open_issues_count":11,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-21T21:22:59.017Z","etag":null,"topics":["clamav","docker","microservice","nestjs","nodejs","pet-project","rest-api","typescript","virus-scanning"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pvarentsov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-27T11:54:28.000Z","updated_at":"2025-02-03T07:58:35.000Z","dependencies_parsed_at":"2023-02-09T08:46:06.395Z","dependency_job_id":null,"html_url":"https://github.com/pvarentsov/virus-scanner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvarentsov%2Fvirus-scanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvarentsov%2Fvirus-scanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvarentsov%2Fvirus-scanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvarentsov%2Fvirus-scanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pvarentsov","download_url":"https://codeload.github.com/pvarentsov/virus-scanner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247463745,"owners_count":20942935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clamav","docker","microservice","nestjs","nodejs","pet-project","rest-api","typescript","virus-scanning"],"created_at":"2024-11-05T21:21:14.494Z","updated_at":"2025-04-06T09:32:00.566Z","avatar_url":"https://github.com/pvarentsov.png","language":"TypeScript","readme":"# Virus Scanner\n\nThis project is a virus scanner as a microservice with REST interface. It consists of ClamAV and NodeJS client for ClamAV.\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](./LICENSE)\n![Build](https://github.com/pvarentsov/virus-scanner/workflows/Build/badge.svg)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=pvarentsov_virus-scanner\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=pvarentsov_virus-scanner)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=pvarentsov_virus-scanner\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=pvarentsov_virus-scanner)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=pvarentsov_virus-scanner\u0026metric=ncloc)](https://sonarcloud.io/dashboard?id=pvarentsov_virus-scanner)\n\n## ClamAV\n\n[ClamAV](https://www.clamav.net/) is used as a docker image. It runs:\n* `clamd` daemon socket listening on port 3310;\n* `freshclam` signature database update tool in the background.\n\n## REST Client\n\nREST Client is a NodeJS application based on [NestJS](https://nestjs.com/) framework. \n\n## How-To\n\nTo run microservice you can use `docker compose`. It will run Scanner service on port 3310 and API service on port 1337.\n\nUsage: \n\n1. `docker-compose pull`\n2. `docker-compose up -d`\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    The API documentation will be available on endpoint \u003ci\u003eGET \u003ca href=\"http://localhost:1337/api/documentation\" target=\"_blank\" rel=\"noopener noreferrer\"\u003ehttp://localhost:1337/api/documentation\u003c/a\u003e\u003c/i\u003e\n  \u003c/summary\u003e\n  \u003cbr\u003e\n  \n  ![API documentation](./assets/readme.api-documentation.png)\n\u003c/details\u003e\n\n\n## Configuring\n\nREST Client configuring is based on environment variables. See all variables [here](nodejs-rest-client/env/.env). In current implementation all variables are required and must be exposed before starting the REST Client.\n\nClamAV uses [clamd.conf](scanner/clamav/docker/clamd.conf) and [freshclam.conf](scanner/clamav/docker/freshclam.conf) configuration files. You can change these before building the docker image. See the full documentation for [clamd.conf](https://linux.die.net/man/5/clamd.conf) and [freshclam.conf](https://linux.die.net/man/5/freshclam.conf).\n\n## Local Development\n\nTo develop locally you can run ClamAV container in the background: `docker-compose up -d scanner`.\n\nTo run REST Client manually on your machine need to:\n* have NodeJS with version `\u003e 11` and `yarn` installed globally\n* enter to the client directory - `cd ./nodejs-rest-client`\n* install dependencies - `yarn install`\n* build project - `yarn build`\n* run project - `yarn start`\n\nTo run unit tests use:\n* `yarn test:unit`\n* `yarn test:unit:coverage`\n\nYou can run client with variables from [.env](nodejs-rest-client/env/.env). Use `yarn start:local` command instead `yarn start`.\n\n## Notes\n\n* This project is not production-ready. \n* The running of the `clamd` and `freshclam` can take a little time. So clamav can be unavailable the first 20-30 seconds after starting.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvarentsov%2Fvirus-scanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpvarentsov%2Fvirus-scanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvarentsov%2Fvirus-scanner/lists"}