import type { MalwareConfig } from '@stacksjs/types' import { env } from '@stacksjs/env' /** * **Malware Scanning** * * Every upload surface (storage, forms, inbound email, AI inputs, the file * manager, validation) scans the bytes it receives before storing or using * them. This file overlays the framework defaults; nested objects merge. * * `auto` uses the first zavd or clamd socket that answers and, when none * does, lets everything through with a warning. Name a driver in production * (`guardian` for zavd, `clamd` for ClamAV) so a missing scanner refuses * uploads instead. See the stacks-malware skill. */ export default { driver: (env.MALWARE_DRIVER as MalwareConfig['driver'] | undefined) || 'auto', /** An upload the scanner could not vouch for is refused. */ failClosed: true, clamd: { socket: env.CLAMD_SOCKET || undefined, }, guardian: { socket: env.ZAVD_SOCKET || undefined, }, quarantine: { enabled: true, path: 'storage/quarantine', }, } satisfies MalwareConfig