Commit Graph
2 Commits
Author SHA1 Message Date
Thore Cimbal dc856186d1 fix: use Twisted networking instead of asyncio in ClamAV module
Auto-Deploy on Push / verify-and-notify (push) Canceled after 0s
Synapse runs on Twisted's reactor, not asyncio's event loop - the
original asyncio.open_connection/wait_for calls failed immediately
with "RuntimeError: no running event loop", silently fail-opening
every scan (confirmed live: EICAR test file passed through unscanned).
Rewritten using twisted.internet.endpoints.HostnameEndpoint/
connectProtocol and a custom Protocol for the INSTREAM conversation.
2026-07-29 15:42:46 +02:00
Thore Cimbal db77785b6b feat: real media antivirus scanning via custom Synapse module (Issue #19)
Auto-Deploy on Push / verify-and-notify (push) Canceled after 0s
Deploys ClamAV and a small stdlib-only Synapse spam-checker module
implementing check_media_file_for_spam over clamd's INSTREAM protocol.
Unlike the originally-considered matrix-content-scanner proxy (which
needs client-side cooperation neither Element Web nor Element X
provide), this hooks Synapse's own module API directly - transparent
to every client for unencrypted media. No custom Synapse image needed:
the module is mounted via a ConfigMap onto PYTHONPATH using the ESS
chart's extraVolumes/extraVolumeMounts/extraEnv support. Fails open on
scanner errors so a ClamAV outage can't block all uploads.
2026-07-29 15:29:47 +02:00