{"id":24865050,"url":"https://github.com/sindrel/restful-clam","last_synced_at":"2025-03-26T18:43:52.833Z","repository":{"id":108217251,"uuid":"197067594","full_name":"sindrel/restful-clam","owner":"sindrel","description":"ClamAV with a REST API, written in Golang.","archived":false,"fork":false,"pushed_at":"2019-07-18T06:21:39.000Z","size":2558,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2023-03-04T20:03:28.381Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sindrel.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-15T20:27:51.000Z","updated_at":"2024-06-19T07:40:26.296Z","dependencies_parsed_at":null,"dependency_job_id":"2446fa82-b451-4a9a-8241-96c68aa30eb3","html_url":"https://github.com/sindrel/restful-clam","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindrel%2Frestful-clam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindrel%2Frestful-clam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindrel%2Frestful-clam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindrel%2Frestful-clam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindrel","download_url":"https://codeload.github.com/sindrel/restful-clam/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245717622,"owners_count":20661143,"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":[],"created_at":"2025-01-31T23:57:18.917Z","updated_at":"2025-03-26T18:43:52.816Z","avatar_url":"https://github.com/sindrel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![image](img/clamav.png)\n\n# RESTful Clam!\n\nContainerized ClamAV antivirus with a REST API, written in Golang, with interactive Swagger UI documentation.\n\n  - **Fast!** Uses the ClamAV daemon to run antivirus scans.\n  - **Lightweight!** Image based on Alpine Linux, API written in Go.\n  - **Easy!** Everything packed in a single image.\n\n## Features\n\n  - Supports uploads using form-data or base64 encoded strings in JSON payloads\n  - Instant virus scans\n  - Upload files and test the API interactively using the Swagger UI\n  - Can easily be implemented as a standalone service in a microservices architecture\n\n## Getting started\nFor development/testing only:\n```\n$ docker run -it -d --name restful-clam -p 8080:8080 sindrel/restful-clam\n```\nDownloading virus definition updates and starting the ClamAV daemon sometimes takes 1-2 minutes. Use the readyness probe endpoint to check if it's ready: \n\n```\n$ curl -I -X GET \"http://localhost:8080/api/v1/health/ready\"\nHTTP/1.1 200 OK\nDate: Mon, 01 01 2019 00:00:01 GMT\nContent-Length: 0\n```\n\nTest a file using command line:\n```\n$ curl -X POST \"http://localhost:8080/api/v1/file/form?scan=true\" -H  \"accept: application/json\" -H  \"Content-Type: multipart/form-data\" -F \"file=@eicar.txt\"\n```\n\nExample response (file infected):\n```json\n{\n  \"id\": \"e669053f-8125-83dd-f386-cd91b458f092\",\n  \"sha256sum\": \"131f95c51cc819465fa1797f6ccacf9d494aaaff46fa3eac73ae63ffbdfd8267\",\n  \"output\": \"Eicar-Test-Signature FOUND\\n\",\n  \"scanned\": true,\n  \"infected\": true\n}\n```\n\nExample response (file clean):\n```json\n{\n  \"id\": \"e669053f-8125-83dd-f386-cd91b458f092\",\n  \"sha256sum\": \"131f95c51cc819465fa1797f6ccacf9d494aaaff46fa3eac73ae63ffbdfd8267\",\n  \"scanned\": true,\n  \"infected\": false\n}\n```\n\n### Examples (Swagger)\nFor more examples use the interactive Swagger UI documentation:\n\n[http://localhost:8080/swaggerui/](http://localhost:8080/swaggerui/)\n\nNote the trailing slash (\"/\").\n\n\n![image](img/screenshot.png)\n\n## Configuration\n### Environment variables\n\n| Variable | Example value | Description |\n| ------ | ------ | ------ |\n| API_CONTEXT_PATH | \"/restful-clam\" | Sets the API context path (default is /). |\n| DATA_DIR | \"/data\" | Sets the base directory for file storage. |\n| NO_FRESHCLAM_ON_STARTUP | 1 | Disables antivirus database updates during startup. |\n\n### ClamAV configuration\nSet your own custom ClamAV configuration by modifying the clamav/clamd.conf file.\n\n## Development\nWant to contribute? Great! \n\nThis was originally ment as a PoC, so I'm sure you'll find something you would like to improve. Pull requests are most welcome.\n\n## Maintainer\nSindre Lindstad\n\n## License\nGNU GPLv3 ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindrel%2Frestful-clam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindrel%2Frestful-clam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindrel%2Frestful-clam/lists"}