Malware scanning
Read the malware scan's word at every artifact, choose whether unchecked content may be downloaded, and release a false find.
On this page
Quader checks the bytes of every file a client can download against ClamAV's signatures of known malware, once per content for the whole
installation, in the pods malware-scanner-clamav. Content in which it finds a signature is refused while the scanning is on
(malware.enabled, on by default). A signature scan does not find malware no signature describes yet, such as an install script
published today; for npm and NuGet the vulnerability findings block known malicious packages by name.
The malware scan's states
Wherever an artifact is listed or shown, Malware scan gives its state in one word: in the lists of packages, versions, image tags and files, beside a version's grade, in its tab Files and on a file's page. A file Quader writes itself has none.
| Word | Means | Downloads |
|---|---|---|
| Checked | No known signature found. Green until a new check is overdue, then amber; the details say how old the signatures were | Served |
| Unchecked | Waits for its scan; amber when no scanner or no signature database is there | Served, or where only checked artifacts are served, waits up to malware.download_wait |
| Malware | A signature matched | Refused |
| Not checkable | Nothing could read the bytes to the end (below) | Served, or refused where only checked artifacts are served |
| Released | An auditor released the bytes after looking at them | Served |
A package, version or image shows the worst word of its files, in the order of the table from the bottom up: Malware, Not checkable, Unchecked, Released, Checked. A part of an image a remote never fetched does not count. The same bytes have the same state in every repository.
Open the word for its details: what the scan found, when, the scanner and its ClamAV version, the signatures then and today, and the next check. Technical details add ClamAV's own name of what tripped and the SHA-256. A Bastion's pages show the same word and check time without the ClamAV version, the replica and the next check. Where the download is refused the page offers no Download; what a client sees is in Errors and troubleshooting.
Note
Nothing is deleted: refused bytes stay stored, so a false find costs no data.
The settings page
- Who
- holders of
settings:readread it; the switches and Scan everything again needsettings:write - Where
- Admin area › Settings › Malware scanning
| Section | What it holds |
|---|---|
| Downloads | Only checked artifacts can be downloaded, off by default. On, unchecked content waits for its scan and is then refused with 503 and Retry-After; content nothing could check is refused until released. Save changes first names how much is affected |
| Scanning | The scan controller, which orders the checks and hands them to the scanners: slots in use, checks in the last hour, a scanner Paused while it loads new signatures or Resting after a failure. Add scanner replicas. appears with a number when the slots stay busy. Below: what waits, the queue, and each replica with its ClamAV version and what each slot checks |
| Signature database | The version in use, Current or Stale (scanning goes on), the repository upstream/clamav, and a failed update with its reason |
Scan everything again queues every verdict behind waiting downloads and new content; each stays in force until its new scan. The keys
are under malware.
When a file is checked again
A file is checked when stored. Its scan pressure then grows with how much newer the signatures in use are than its check's, plus a bonus for its downloads; at the cycle it is checked again, highest first. Rescans holds the bounds, in days:
| Setting | Default | Means |
|---|---|---|
| Cycle | 30 | A file nobody downloads is checked again once the signatures are this much newer |
| Per doubling of downloads | 6 | Each doubling of its downloads brings that forward |
| Shortest | 1 | The most-downloaded files never wait longer |
| Downloaded within | 7 | Checked again at every new set of signatures; 0 switches this off |
| Overdue after | 7 | A check due longer counts as overdue |
A new ClamAV version adds no pressure: select Scan everything again after raising it.
A repository's own setting
A repository's Settings › Malware scan (never part of creating one) holds Only checked artifacts can be downloaded from this
repository. It only makes the repository stricter and is fixed on while the installation's switch is on; on a virtual repository it
covers its members. A project Owner may switch it on; off needs repositories:write-config or vulnerabilities:triage.
The finds
- Who
- holders of
content:metadata-read(auditor, admin); Release also needsvulnerabilities:triage - Where
- Security audit › Malware
One row per content: the same bytes in thirty repositories are one row, with the first file and how many more hold them, and the verdict with the signature or the reason. How current the checks are counts the checks under today's signatures, older ones, due, overdue and not checked yet. Search by path or signature; filter by state, release and repository.
Release takes a reason, kept and audited, and names every repository that holds the bytes: the release serves them from all, with or without the switch, survives new scans and storing again, and lasts until Withdraw release. Release a false find, or content nothing could check that you have looked at.
Could not be checked
| Reason | What happened |
|---|---|
| Too large | Larger than the largest file scanned (malware.max_size) |
| A limit of the scanner was passed | ClamAV stopped at a limit: data read from one file, a file inside an archive, nesting, entries, time, or an unreadable stream. The verdict names it and its value |
| Encrypted | An encrypted archive or document |
| Every scan failed | The last error is named |
Warning
A program written in Go can pass the limit for the data read from one file without holding an archive: it carries the first bytes of a RAR archive, which ClamAV follows. No ClamAV version is free of this yet. Content can also pass the limit on purpose, so the verdict never says which it is.
To decide, open the row, see where the bytes come from, and compare their SHA-256 with the publisher's. Then leave them refused, or release them with a reason saying what you checked.
Signature updates
One pod, malware-updater-freshclam, runs ClamAV's freshclam without any credential every two hours; the worker takes what is new every
30 minutes into upstream/clamav, which keeps the version in use and the one before. A refused file or one whose ClamAV signature does
not verify is never used: the version in use stays. The page names a failure in words, with its code under Technical details.
Egress. Where your cluster denies egress by default, label the updater's pods (malwareUpdaterFreshclam.podLabels) and admit DNS and
database.clamav.net:443, served from Cloudflare's changing addresses. privateMirror and proxy of malwareUpdaterFreshclam replace
that host (Helm values).
Without internet. Set malware.database.source: repository and name a local generic repository in malware.database.repository;
the chart then runs no updater, and the page shows the cvdupdate commands that fill it. Whoever may deploy there decides what the
scanners compare content with, unsigned .cud files included.
The alerts QuaderMalware… are in the runbook.