Security protections
Malware scanning
Scan every downloaded file with a hash blocklist, ClamAV, the known-malicious feed or your own scanner.
Settings, Malware tab. Tick Scan cached files and pick Scanners:
| Scanner | How it works |
|---|---|
| blocklist | A list of sha256 hashes you maintain. A match is MALICIOUS. |
| clamav | Streams each file to your clamd over TCP. Start the bundled one with COMPOSE_PROFILES=clamav. |
| osv | Asks osv.dev whether the exact package and version is a known-malicious one (the OpenSSF malicious packages feed, advisories named MAL-). A hit is MALICIOUS. Only the name and version leave the box, never the file. It catches what a signature scanner has no pattern for, but it only knows what has been reported, so keep a content scanner too. |
| rest | Posts each file to your scanner, which answers with a status such as CLEAN or MALICIOUS. |
- When a scanner says MALICIOUS: reject (default), hold or warn.
- When a scanner says SUSPICIOUS: hold (default), warn or ignore.
- Scan before serving: a file is not served until it has an answer. If that takes over 60 seconds the client gets a 503 and tries again.
- A clean rescan releases the scanner's own holds, but never undoes a person's decision.
- Kill known-malicious packages by themselves (on by default): when the scheduled vulnerability scan finds a MAL- advisory against anything here, that advisory goes on the kill switch at once and admins get the kill switch mail. It is added once. If an admin lifts it, the next scan leaves it lifted.
The Scanner status box shows whether each scanner is ready, and has Scan what has not been scanned, Rescan everything and Stop.
Careful
ClamAV refuses files bigger than its own limits, and with Scan before serving on, a file ClamAV refuses is never served. Out of the box clamd stops at 100 MB, smaller than many container image layers and some Python wheels. The bundled ClamAV reads docker/clamd.conf, which raises the limits to 4000M. If you run your own clamd, set these in its clamd.conf:
clamd.conf
StreamMaxLength 4000M
MaxScanSize 4000M
MaxFileSize 4000M
A file that was too big shows "too big for clamd" in its scan result, and developers are told an admin has to raise the scanner size limit. Once the limit is raised, the next download scans it again.