A Jahia module that scans uploaded files against a ClamAV antivirus daemon and blocks any upload containing detected malware.
@babel/plugin-transform-modules-systemjs and systeminformation.431fe9d)MultiReadHttpServletRequest: bound buffered body by configurable max size; throws RequestTooLargeException → HTTP 413 to prevent unauthenticated heap DoS.ClamavFilter: scoped to scan-eligible requests, forwards the wrapped request downstream so scanned bytes equal consumed bytes (closes TOCTOU); fails-closed with HTTP 503 when ClamAV is unreachable instead of silently passing uploads.clamavSaveSettings mutation: validates host charset/length, port range and timeout bounds to block scanner-rewrite SSRF that could bypass scanning.clamavScanTest: caps base64 input length to prevent decode DoS.ClamavServiceImpl: bounded INSTREAM reply reads, CRLF-stripped/truncated log messages, explicit US-ASCII/UTF-8, defensive bounds checks in populateVirusScanResult.ClamavConfig: atomic full-update validation; fields made volatile.ec95a77, c275ea8)aria-hidden="true" on alert icon spans (✓ / ✕) to stop AT reading Unicode names.aria-live="polite" on filename display; kept always in DOM so selection is announced.focus() calls on sr-only divs after async ops; aria-live announces without stealing focus.aria-describedby host-input format hint; tooltip colour darkened #767676 → #6b6b6b.aria-describedby + sr-only rationale on disabled scan section.0833b6b, 3979225)#2e7d32 → #1b5e20 → #175217 (final ~8.3:1 on #e8f5e9).#c62828 → #9e1a1a (~7.1:1 on #fdecea).#0077cc → #004a80 (~9.2:1 on white).2229fbc — upgrade systeminformation 5.31.5 → 5.31.6 via resolution (CVE fix).c5c9a42 — upgrade @babel/plugin-transform-modules-systemjs (Dependabot alert).ClamavFilter / MultiReadHttpServletRequest / ClamavServiceImpl / ClamavConfig substantially reworked alongside the security fix (431fe9d) — clearer scoping, explicit charsets, atomic config swaps.ClamavConstants extended with new bounds/error constants.ClamavMutationExtension, ClamavQueryExtension) reorganised around input validation and error reporting.ClamavFilter.jsx / .scss) restructured around fixed live-region pairs and contrast-compliant tokens.en.json updated for new validation and accessibility messages.tests/package.json and tests/yarn.lock updated (dependency bumps); no new test commits identified in range.cba8b9d — add Claude basic context.38113e3 — rename CLAUDE.md to AGENTS.md, add CLAUDE.md reference shim.Full Changelog: 1_0_0...1_0_1
The module reads its settings from the OSGi configuration file:
$JAHIA_DATA_DIR/karaf/etc/org.jahia.community.clamav.cfg
| Property | Default | Description |
|---|---|---|
host |
localhost |
Hostname or IP address of the ClamAV daemon |
port |
3310 |
Port of the ClamAV daemon |
connection_timeout |
2000 |
Maximum time (ms) to wait when connecting to the daemon |
read_timeout |
20000 |
Maximum time (ms) to wait for the scan response |
Changes to the configuration file are applied immediately — no restart required.
Settings can also be edited directly in the Jahia administration panel:
Administration → Server Health → ClamAV Antivirus Settings
The UI allows editing all four settings, saving them, and testing the connection to the daemon. The connection is tested automatically when the page opens. The file scan test section is disabled when the daemon is not reachable.
INSTREAM command.Start a local ClamAV daemon with Docker:
docker run --interactive --tty --rm --publish 3310:3310 --name clamav clamav/clamav:stable
Wait for the container to print socket found, clamd started. before testing.
To trigger a detection, use the EICAR test file — a standard, harmless file that every compliant antivirus engine flags as malware.
Requirements: JDK 17+, Maven 3.x, Node.js v22, Yarn v1.22
mvn clean install
The frontend assets are built automatically via the frontend-maven-plugin as part of the Maven build.
graphql-dxm-provider moduleMIT License
Copyright (c) 2026 - present Florent BOURASSÉ
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.