Fail-closed structural inspection and content disarm and reconstruction (CDR) for untrusted uploads. UploadInspector.sanitize writes a clean copy keeping only parts known to be safe (strips EXIF/GPS, XMP, comments, unknown chunks/boxes from PNG, JPEG, GIF, WebP, HEIC, AVIF, MP4, QuickTime; rebuilds SVG from an allowlist; neutralizes CSV formulas; optional ruby-vips re-encode). Structural checks reject macros, PDF JavaScript/actions, OLE objects, remote templates, DDE, zip bombs, image polyglots, and dangerous filenames (hidden extensions, bidi tricks). Malware scanning (0.10): pluggable scanner adapters including ClamAV (clamd INSTREAM via pure-Ruby socket), custom command binaries, and AWS GuardDuty Malware Protection for S3 tags. Integrations & CLI (0.11): upload_inspector CLI (check, scan directory, sanitize), signed Active Storage analyzer, Shrine plugin, CarrierWave mixin, and Rack middleware. Works with Rails uploads, S3 presigned URLs, and plain IO in a resource-limited child process. Pure Ruby (libvips only for optional re-encode). Usage and options: https://akarui2004.github.io/upload_inspector

Required Ruby Version

>= 3.2

Authors

Minh Doan

Versions

  1. 0.11.1
    1. source

      1. 0.11.1 source November 27, 2026 (83 KB)
  2. 0.11.0
    1. source

      1. 0.11.0 source November 27, 2026 (82.5 KB)
  3. 0.9.1
    1. source

      1. 0.9.1 source November 25, 2026 (69.5 KB)
  4. 0.9.0
    1. source

      1. 0.9.0 source November 25, 2026 (69.5 KB)
  5. 0.8.1
    1. source

      1. 0.8.1 source November 23, 2026 (55 KB)
Show all versions (15 total)

Pushed by

GitHub

SHA 256 checksum

Provenance