Adding onto what colbert mentioned, you cannot directly modify the local and executed files of an installed plugin. However, you could try to emulate a plugin via an installed plugin. If the plugin files are are acquired through the :GetObjects()
function of the Data Model (game) and the scripts containing the source code are converted into module scripts, a separate plugin can simply require such module scripts and initialize the entire plugin asynchronously with your anti-virus plugin.
Of course some plugin mechanics would have to be modified, such as the plugin’s settings, so that certain plugins aren’t able to interact with other plugins. Though I assume that wouldn’t be too much of an issue, considering that you’d probably already have a framework implemented that could detect and edit specific harmful components of a script.