Add status check for home response
Add API capability to scan target path
This commit is contained in:
parent
b0cbdd5a47
commit
fbe6b29c23
2 changed files with 66 additions and 8 deletions
11
README.md
11
README.md
|
@ -1,15 +1,11 @@
|
|||
 []()
|
||||
|
||||
This is two in one docker image so it runs open source virus scanner ClamAV (https://www.clamav.net/), automatic virus definition updates as background process and REST api interface to interact with ClamAV process.
|
||||
|
||||
Travis CI build will build new release on weekly basis and push those to Docker hub [ClamAV-rest docker image](https://hub.docker.com/r/niilo/clamav-rest/). Virus definitions will be updated on every docker build.
|
||||
|
||||
|
||||
## Usage:
|
||||
|
||||
Run clamav-rest docker image:
|
||||
```bash
|
||||
docker run -p 9000:9000 --rm -it niilo/clamav-rest
|
||||
docker run -p 9000:9000 -v ./scan-target:/scan-target --rm -it clamav-go-rest
|
||||
```
|
||||
|
||||
Test that service detects common test virus signature:
|
||||
|
@ -39,6 +35,11 @@ Content-Length: 33
|
|||
{ Status: "OK", Description: "" }
|
||||
```
|
||||
|
||||
Test that service returns results for scan target directory:
|
||||
```bash
|
||||
$ curl http://localhost:9000/scanPath?path=/scan-target
|
||||
```
|
||||
|
||||
**Status codes:**
|
||||
- 200 - clean file = no KNOWN infections
|
||||
- 406 - INFECTED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue