Needs work
Project:
ClamAV
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Feb 2025 at 20:57 UTC
Updated:
14 Oct 2025 at 11:51 UTC
Jump to comment: Most recent
We've tried using the Drush command provided in #2919464: Provide drush command for re-scanning existing files and have couple issues:
$this->scanner->isScannable() check so "Scannable schemes / stream wrappers" selection or hook_clamav_file_is_scannable implementations have no effectcode
review
commit
Additional option for the Drush command to scan only specified file IDs.
None/TBD
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
rosk0Manually tested locally with TCP/IP and executable modes - works as expected.
Not sure what GitLab doesn't like about my branch - I could merge it into the 2.x locally with no issues in fast-forward mode, also this is confirmed by the green tick mark ( if I understand this correctly ) next to the "Merge request must be rebased, because a fast-forward merge is not possible." check in the merge request overview.
Comment #5
almunningsIs the namespace of this command incorrect?
With drush 12
drush status --debugResults in
Suggest changing:
And moving the file accordingly
Comment #6
sokru commentedNot sure if we should generate separate bug issue for missing isScannable check. The processScannerBatch code would need something like this:
Also as bigger architectural decision is if the scan results should be stored on some database table. On large sites it would be beneficial to split the scans on smaller chunks and retry the failed scans. Eg. storing the last scan date, would allow to only scan files older than X days.
Comment #7
sokru commented#5 the namespace has case issue on https://git.drupalcode.org/project/clamav/-/blob/2.1.x/src/Drush/Command..., it should be
namespace Drupal\clamav\Drush\Commands;instead ofnamespace Drupal\Clamav\Drush\Commands;.Comment #8
sokru commented