Docs cipi.yml Web panel API MCP Guides Compare GitHub Telegram channel
  1. Docs
  2. Security
  3. Malware scan

Malware scan

Nightly scans of app files.

Security

Answers one question every night: did anything change in this app that no deploy put there? Integrity first, then ClamAV on upload folders. Off until you enable it.

Commands#

bash
cipi scan enable            # nightly at 04:40
cipi scan [myapp]           # now
cipi scan status | report
cipi scan manifest myapp    # re-baseline after a legitimate manual change
cipi scan disable

How it works#

Step 1 of 4Every deploy

When a deploy finishes, Cipi records a fingerprint (sha256) of every file in the release. Stored root-only, so the app can't rewrite it.

Design choices#

Design choiceWhy
Manifests in /var/lib/cipi/manifests, root-onlyA webshell in the app's home can't rewrite them
Antivirus only on upload foldersThe manifest already covers everything a deploy put there; less noise, less RAM
Every re-baseline logged in events.logA manifest rewrite without a deploy is the thing to look for
scan_incomplete is never called "clean"A check that didn't finish told you nothing
Filenames compared exactly (spaces, backslashes)Tricks like sh\ell.php can't hide
Refused below 2 GB free RAM / 3 GB on /varClamAV loads all signatures; an OOM kill could take the database down

Alerts: scan_integrity (changed or extra files, plus PHP isolation drift) and scan_incomplete.

It detects change between deploys; it doesn't prevent it. Isolation (per-app users, open_basedir) remains the first line of defence; this verifies it still holds.