Skip to content

Improve virus scan performance with clamdscan - #45

Merged
douz merged 1 commit into
trunkfrom
feature/TENUPSYS-3848-clamdscan
Sep 3, 2026
Merged

Improve virus scan performance with clamdscan#45
douz merged 1 commit into
trunkfrom
feature/TENUPSYS-3848-clamdscan

Conversation

@douz

@douz douz commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • install clamav-daemon alongside the existing ClamAV packages
  • run a short-lived, isolated clamd instance for each virus scan
  • use clamdscan --multiscan to parallelize directory scanning
  • preserve the existing cache exclusions and exit behavior
  • add focused regression coverage for clean, infected, startup-error, and scan-error paths

Behavior

  • clean scan: exits 0
  • infection found: exits 1
  • scanner or daemon error: exits 0 to preserve the existing fail-open deploy behavior
  • .composer-cache and node_modules_cache remain excluded

Testing

  • bash tests/test-virus-scan.sh
  • bash -n scripts/virus-scan tests/test-virus-scan.sh
  • shellcheck scripts/virus-scan tests/test-virus-scan.sh
  • PHP 8.4 Bookworm image build
  • real container scans for clean, EICAR, excluded EICAR, and invalid database paths

Ticket: TENUPSYS-3848

@douz
douz merged commit 87aef08 into trunk Sep 3, 2026
8 checks passed
@douz
douz deleted the feature/TENUPSYS-3848-clamdscan branch September 3, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant