I'm not familiar with gaps within the Canadian system specifically, but I can offer some best practices from other systems.
There are a variety of tools available to governments to fight foreign interference. There are naming and shaming sanctions and indictments. There are targeted, technical actions, such as cyber-operations that could be carried out to disrupt the foreign activity, especially during a sensitive, temporary period, such as before or after an election. There are others, as well, like Professor Fung mentioned, that are simply public disclosure and public information.
One path would be to build capacity in each of those areas, but another path would be to build connectivity across these areas and make sure that they're working together, which is something the U.S. government has done.
I will say that, in the end, it's not clear how effective any of these policies are. We've been naming and shaming, indicting, sanctioning and disrupting these adversaries for some time. It probably has some operational impact on them, but it doesn't stop the activity.