Giter Club home page Giter Club logo

clamav4pipeline's Introduction

AV DB Build

clamav4pipeline

The clamav4pipeline is a command line tool which can be used to run ClamAV antivirus scan on top of specified directory. The latest clamav4pipeline docker image contains latest virus database that is updated twice a day.

Docker Image

The latest Docker image is located in Docker Hub. The image is rebuild and AV DB updated every day at 0:00 UTC and 12:00 UTC. Check the last build here.

Behaviour

When the clamav4pipeline is executed the scan progress is printed to the standard out. Overall report is generated in specified directory at the end of the run. The clamav4pipeline returns exit code 1 when there are infected files 0 otherwise.

Usage

Docker

# Directory to be scanned
SCAN_DIR=/tmp
# Output directory for the scanner log
OUTPUT_DIR=/tmp
docker run -v $SCAN_DIR/:/workdir/:ro \
           -v $OUTPUT_DIR/:/output/:rw \
           -it --rm kcollasarundell/clamav4pipeline:latest \
           scan.sh -d /workdir -l /output/log

GitLab CI/CD

clamav_scan:
  variables:
    SCAN_LOG: "av.log"
  stage: test
  dependencies:
    - install
  image:
    name: kcollasarundell/clamav4pipeline:latest
  only:
    - branches
    - tags
    - merge_requests
  before_script: []
  script:
    - scan.sh -d . -l ${SCAN_LOG}
  artifacts:
    paths:
      - ${SCAN_LOG}

GitHub Actions

clamav_scan:
    runs-on: [ubuntu-latest]
    container: 
      image: kcollasarundell/clamav4pipeline:latest
      
    steps:
      - uses: actions/checkout@v1
      - name: AV Scan
        run: scan.sh -d . -l av.log
      - run: chmod a+r av.log
      - name: Upload AV scan artefacts
        uses: actions/upload-artifact@v1
        with:
          name: av_scan
          path: "av.log"

This repository was forked from luborpetr who had done great work on it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.