---
name: "clamav-file-antivirus-scanner"
description: "Scan user-uploaded files and attachments for viruses, trojans, and malware with ClamAV."
metadata:
  author: "Cisco Talos"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "scan file with clamav"
  - "update freshclam virus database"
  - "stream file to clamd socket"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# ClamAV File Upload Malware Scanning Daemon

Integrates ClamAV antivirus engine (clamd, freshclam): updating virus definitions, scanning file uploads in web services over clamd TCP sockets, and isolating infected files.

## When to Invoke
Invoke this skill whenever you need to:
- scan file with clamav
- update freshclam virus database
- stream file to clamd socket

## Execution SOP & Rules
1. Run freshclam to update the virus signature database before scanning.
2. Stream uploaded file bytes to clamd socket via clamdscan --stream for sub-second scanning.
3. Reject any upload where ClamAV returns a non-zero exit code or positive signature match.
4. Log detected virus signatures and quarantined file hashes for threat intelligence.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
