Clamby

screenshot of Clamby

ClamAV interface to your Ruby on Rails project.

Overview

Clamby is a Ruby gem designed to enhance file upload security by scanning files for viruses before they are processed. With the increasing threat posed by malware and viruses, having robust scanning mechanisms in place has become essential for protecting both your software and its users. Clamby integrates seamlessly with the clamscan and freshclam daemons, ensuring files uploaded to your application go through essential virus scanning procedures. This gem is particularly valuable for developers concerned about safeguarding their applications against potential threats.

By providing straightforward methods to scan uploaded files, Clamby takes the guesswork out of virus detection, allowing developers to focus on building features rather than worrying about security. Whether in a development or production environment, Clamby offers the tools necessary to maintain high levels of security with minimal overhead.

Features

  • Two Scanning Methods: Choose between safe? to check for safety or virus? to determine if a virus is present, with clear return values indicating the scan's result.

  • Easy Integration: Simply add gem 'clamby' to your Gemfile and run bundle install to get started without hassle.

  • Customization Options: The ability to modify how files are handled post-scan allows developers to implement their own logic for dealing with detected viruses.

  • Daemonization for Efficiency: Enabling daemonization keeps clamscan in memory, significantly reducing wait times for subsequent virus scans by avoiding repeated loading.

  • Update Definitions: Easily maintain up-to-date virus definitions with the Clamby.update method, which runs the freshclam service.

  • Development Configuration: Options to exclude checks for clamscan during development to avoid confusion if the daemon isn’t installed.

  • Error Handling: Enhanced error suppression features let you override exceptions and manage errors more effectively during scanning.

  • ActiveStorage Compatibility: Special considerations for working with ActiveStorage make it easy to integrate Clamby in applications utilizing this storage solution.