Configures ClamAV malware scanning for uploaded files in Orchard Core 4.0. Covers the OrchardCore.Antivirus.ClamAV feature, fail-closed behavior, clamd Docker setup, and connection settings.
Ships in orchardcore. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an Orchard Core expert. Generate configuration and deployment guidance for scanning uploaded files with ClamAV before Orchard Core stores them.
OrchardCore.Antivirus.ClamAV (ClamAV Antivirus Scanner, Security category) registers a ClamAV IFileEventHandler in the shared file upload security pipeline. The pipeline itself (FileCreationService, custom upload code, custom handlers) is covered by orchardcore-file-upload-security.OrchardCore.Application.Cms.Core.Targets. Only an app that references individual modules needs <PackageReference Include="OrchardCore.Antivirus" Version="4.*" /> in the web project.Host, invalid settings, connection failure, timeout, or unexpected clamd response also rejects it.{ "steps": [...] } format.Configure the connection before enabling the feature; until clamd is reachable every upload is rejected.
{
"steps": [
{
"name": "feature",
"enable": [
"OrchardCore.Antivirus.ClamAV"
]
}
]
}
The section is OrchardCore:Antivirus:ClamAV (new in 4.0, no legacy OrchardCore_ name). It is read through IShellConfiguration, so it can be set per tenant, and the package ships ConfigurationSchema.json for appsettings IntelliSense.
{
"OrchardCore": {
"Antivirus": {
"ClamAV": {
"Host": "clamav",
"Port": 3310,
"ConnectTimeoutSeconds": 5,
"TransferTimeoutSeconds": 30
}
}
}
}
| Setting | Default | Description |
|---|---|---|
Host | none | Host name or IP of the clamd service. Required. |
Port | 3310 | clamd TCP port, 1 to 65535. |
ConnectTimeoutSeconds | 5 | Connection timeout, greater than zero. |
TransferTimeoutSeconds | 30 | Timeout for streaming the file and reading the verdict, greater than zero. Raise it for large uploads. |
OrchardCore__Antivirus__ClamAV__Host=clamav
OrchardCore__Antivirus__ClamAV__Port=3310
OrchardCore__Antivirus__ClamAV__ConnectTimeoutSeconds=5
OrchardCore__Antivirus__ClamAV__TransferTimeoutSeconds=30
The options are bound with IOptions<ClamAvOptions>, so a configuration change applies after the tenant is reloaded.
services:
clamav:
image: clamav/clamav:stable
ports:
- "3310:3310"
cms:
image: my-orchard-site
environment:
OrchardCore__Antivirus__ClamAV__Host: clamav
depends_on:
- clamav
clamd limits the size of a scanned stream with its own StreamMaxLength setting. Keep it at least as large as the Media MaxFileSize and the largest deployment package you import; a larger file is rejected with a scanner error. A fresh clamav container can take a while to download and load its signatures before it accepts connections.
clamd INSTREAM command. stream: OK lets the upload continue; a ... FOUND response rejects it with the message "The uploaded file '{name}' was rejected because ClamAV detected '{signature}'.".AntivirusScanningException (namespace OrchardCore.Antivirus, derives from FileStoreException). Built-in upload surfaces report it as a failed upload; custom upload code must catch FileStoreException and treat it as a rejection.ITempDirectoryProvider (deleted on close), which then replaces the upload stream; size the temporary volume for it (see orchardcore-temp-file-storage).Uploads that run through FileCreationService, which in Orchard Core 4.0 are:
api/media upload endpoint (admin Media Gallery and media fields).media recipe step.metaWeblog.newMediaObject uploads.TUS resumable uploads (OrchardCore.Media.Tus) and Data Pipelines Save to the media library write through the plain IMediaFileStore.CreateFileFromStreamAsync() in the current source and are not scanned. Custom upload code is scanned only when it follows orchardcore-file-upload-security.
| Symptom | Check |
|---|---|
| Every upload fails after enabling ClamAV | Host is missing, or clamd is unreachable from the app container or still loading signatures. |
| Large uploads fail with a scanner error | Increase TransferTimeoutSeconds and the clamd StreamMaxLength. |
| Uploads are slow under load | Scans with the same configuration are serialized; scale clamd or reduce concurrent large uploads. |
| A custom upload is not scanned | It bypasses FileCreationService; see orchardcore-file-upload-security. |
| Settings change has no effect | Reload the tenant; the options are read once per shell. |
Official Orchard Core videos shown on the documentation page:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
orchard-core, clamav, malware-scanning, file-upload-security, antivirus
140 skills in this plugin
/orchardcore-adminGuidance for the Orchard Core admin panel, including admin controllers and routes, admin menu registration with AdminNavigationProvider, ocat editor forms grouped in cards, admin pages rendering Model.Editor, the UI text casing standard, TheAdmin layout and menu colors, admin branding, the Navbar shape, the Ctrl+K quick navigation palette and QuickNavigationSource, AdminSettings such as MenuBehavior, ShowBreadcrumb, DisplayQuickNavigation, DisplayTitlesInTopbar and ActionsLayout, the AdminDashboard shape, settings pages, and admin filters and zones. Use this skill when requests mention the Orchard Core admin panel, TheAdmin, admin controllers, admin menu registration, an icon on an admin menu item, the AdminSettings recipe step, quick navigation, navigation menu behavior, the admin URL prefix, UI text casing. Strong matches include OrchardCore.Admin, AdminSettings, AdminPermissions, AdminOptions, AdminAttribute, SiteDisplayDriver, IDisplayManager./orchardcore-admin-dashboardSkill for creating admin dashboard widgets in Orchard Core. Covers the DashboardWidget stereotype, DashboardPart position and sizing, the built-in HtmlDashboardWidget, ContentsMetadata and ContentsTags widget types, custom widget content types via recipe or migration, arranging widgets in Manage Dashboard mode, widget template customization, provisioning widgets with recipes, dashboard permissions, the DashboardBreadcrumbProvider Dashboard ancestor, and the AdminDashboardContent shape used when the feature is disabled. Use this skill when requests mention Orchard Core Admin Dashboard, Create and Configure Dashboard Widgets, Enabling Admin Dashboard, Widget Configuration Properties, dashboard widget recipes, Dashboard breadcrumb, or related implementation, setup, or troubleshooting work. Strong matches include OrchardCore.AdminDashboard, DashboardPart, DashboardBreadcrumbProvider, AccessAdminDashboard, ManageAdminDashboard./orchardcore:orchardcore-antivirusfrom orchardcore
npx claudepluginhub crestapps/crestapps.agentskills --plugin orchardcoreOther plugins' skills for the same job