clamav

by QuenchWorks

Helm chartv0.0.7App 1.5.5GPL-2.0-onlyVerified publisher

ClamAV antivirus engine, built from source: clamd scans streams over TCP 3310 for apps that check uploads, with a freshclam sidecar keeping signatures current. Hardened by QuenchWorks as a minimal, nonroot, CVE-gated image, cosign-signed and pinned by digest.

About this chart

Quenchworks ClamAV

Hardened ClamAV, built from the release tarball, on a minimal, nonroot, CVE-gated image, cosign-signed and pinned by digest. clamd scans streams over TCP 3310 for apps that check uploads. A freshclam init container fills the signature database before clamd starts, and a freshclam sidecar keeps it current.

Install

helm install av oci://ghcr.io/quenchworks/charts/clamav

Apps connect to av-clamav:3310 and send files with the clamd protocol (zINSTREAM); most languages have a client library. Check it answers:

kubectl run -it --rm ping --image=ghcr.io/quenchworks/images/busybox:1.38.0 --restart=Never -- \
  sh -c "printf 'zPING\\0' | nc av-clamav 3310"

The signature database and rate limits

database.clamav.net is a CDN that rate-limits heavy users and whole cloud IP ranges. A client on cool-down gets only part of the database (often just bytecode.cvd), and freshclam still exits 0, so clamd starts with far fewer signatures than you expect. Watch the freshclam-init log for cool-down. With more than a couple of clusters, run a private mirror (ClamAV's cvdupdate tool) and set freshclam.privateMirror.

For air-gapped clusters, set freshclam.enabled=false and supply the database yourself through customSignatures, or mount one with extraVolumes.

Memory

The full database needs about 1.5 GiB resident, and briefly twice that while clamd reloads it after an update. The defaults request 1.5 GiB and allow 3 GiB.

Verify the image

cosign verify ghcr.io/quenchworks/images/clamav \
  --certificate-identity-regexp 'https://github.com/quenchworks/.+' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

Each build also ships an SPDX SBOM and SLSA provenance attestation. Verify them with gh attestation verify oci://ghcr.io/quenchworks/images/clamav --owner quenchworks.

Values

KeyDefaultDescription
freshclam.enabledtrueInit container plus updater sidecar
freshclam.checks12Update checks per day
freshclam.mirrordatabase.clamav.netOfficial mirror
freshclam.privateMirror""Your own mirror, preferred when set
customSignatures{}Extra signature files, {filename: content}
clamd.maxThreads10Concurrent scans
clamd.streamMaxLength100MLargest stream accepted
clamd.selfCheck600Seconds between database reload checks
clamd.extraConfig""Raw clamd.conf lines
resources1.5Gi / 3Gi memorySee Memory above
service.port3310clamd Service port
networkPolicy.allowExternaltrueAllow clients from other namespaces

The common quench-common knobs (nodeSelector, tolerations, extraVolumes, sidecars, probes and so on) are available as in every QuenchWorks chart.

Deploy clamav with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has clamav on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartclamav is pinned at v0.0.7 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply