exav is a malware scanner written in Rust. It ships as one MIT-licensed binary
with a scanning CLI, a resident daemon and an ICAP server. It loads the
signature databases you already have (ClamAV’s .cvd/.cld, .ndb/.ldb/
.hdb/.hsb/.mdb/.msb/.cdb/.imp/.cbc, and YARA .yar/.yara) and
speaks two wire protocols: clamd, so clamdscan, milters and existing tooling
talk to it unchanged, and ICAP, so it can replace a
c-icap container behind a proxy or an upload service.
Established engines are large C codebases, and they bound their own work and then
report a file clean without saying so. ClamAV, for instance, reads a file over
about 2 GB, scans none of it, and answers OK. exav is a rewrite in a
memory-safe language built around one rule:
Never report a file clean unless it was fully scanned.
A file exav could not fully examine gets a verdict of its own
(LIMITS-EXCEEDED, UNSCANNABLE or PASSWORD-PROTECTED) instead of OK. A
deployment may choose to deliver such a file anyway, but only by saying so. See
Never a silent clean
for what the rule implies, and Verdicts & exit codes
for how each verdict is reported.
Memory-safe Rust engine
The crates that parse hostile input are #![forbid(unsafe_code)]. The
default build links no C and generates no code at run time, so the
memory-corruption bugs behind most scanner CVEs cannot occur in exav’s own
parsers. Dependencies are another matter: see
Dependencies.
Bounded memory
Most archives are walked member by member instead of being extracted whole,
and a large member waits in a temp file under
budgets you set. A file over a
bound is reported, not called clean.
Native YARA engine
Near-full YARA support through a native tree-walking evaluator: no code
generation at scan time, and a pure-Rust dependency tree.
WASM sandbox
The whole engine compiles to a WASI module, so untrusted signatures can
be loaded without host access, with no custom host code.
Load the database once and serve it over either protocol, or both (neither
protocol authenticates its clients, so bind to an interface only trusted clients
reach):