openshift/clam-scanner

Name: clam-scanner

Owner: OpenShift

Description: Scan files using clamd

Forked from: Miciah/clam-scanner

Created: 2017-06-23 08:20:06.0

Updated: 2017-06-23 08:24:59.0

Pushed: 2017-09-18 13:54:47.0

Homepage: null

Size: 17

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Clam Scanner

Clam Scanner scans files with Clamav by submitting file descriptors to a clamd process over a Unix domain socket.

Building

Ensure build dependencies are installed:

$ go get github.com/golang/glog github.com/spf13/cobra github.com/spf13/pflag

Build clam-scanner using go install:

$ go install
Usage

Use the scan command to perform a scan. Use the --path flag to specify the path to scan, and use the --socket flag to specify the Unix domain socket for clamd:

$ clam-scanner scan --path=/path/to/scan --socket=/run/clamav/clamd.scan/clamd.sock

Use the --omit-negative-results flag to omit results for files with negative (“OK”) results:

$ clam-scanner scan --path=/path/to/scan --omit-negative-results
Running as a container

Build an image using the included Dockerfile:

$ docker build -t clam-scanner .

Run the new image in a privileged container with the clamd socket mounted to /run/clamd.scan/clamd.sock and the path to be scanned mounted to /tmp/scan-data:

$ docker run -it --rm --privileged \
    -v /run/clamd.scan/clamd.sock:/run/clamd.scan/clamd.sock \
    -v /path/to/scan:/tmp/scan-data \
    clam-scanner

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.