sineflow/clamav
Laravel integration for ClamAV virus scanning. Scan uploaded files and local paths through clamd using a simple API or validation rule, with configurable Unix socket or TCP connections for reliable malware detection.
Scanner::scanStream() — meaningfully changes the calculus for streamed/in-memory content: scanning S3 objects, HTTP request bodies, base64-decoded or generated payloads before they touch disk. Previously you'd write a temp file to scan; now you can scan the stream directly. This unlocks:
scanStream() lowers the cost of synchronous pre-persist scanning, so "scan inline before commit" becomes a viable option rather than a temp-file workaround.Adopt when:
clamav/clamav container, sidecar, or host service.Look elsewhere or reconsider when:
For executives: We can add malware scanning to file uploads with a small, well-scoped integration instead of a bespoke security build. It wraps ClamAV — open source and widely deployed — behind a Laravel package, so incremental cost is mostly operational (running the scanner) rather than engineering. The v2.1.0 streaming API lets us scan content before it's written to disk and fits our serverless/object-storage direction, reducing both risk and infra overhead. Recommendation: low-risk adoption with a contained blast radius; the main trade-off is owning the ClamAV runtime.
For engineering: Drop-in Laravel package — config, facade, validation rule, queue-friendly. v2.1.0 adds Scanner::scanStream() for in-memory/streamed content (S3, request bodies, chunked uploads) without temp-file juggling. Requires a reachable ClamAV daemon/socket plus a plan for signature updates and health checks. Testable via mocks/fakes. Keep scanning off the hot path where possible (queue after persist) or use scanStream() to reject content before it's persisted.
How can I help you explore Laravel packages today?