That's a good question.
I can't say at this point whether it could have been avoided. Checks should certainly be much more thorough. Existing policies and monitoring mechanisms were not followed, and that was the main aspect of the breach that took place. In this case, they were not foreign agents, but people who became Canadian citizens for a certain period of time. It could therefore be said that this was the case, theoretically.
That said, as soon as they co‑operated with a foreign agency, which is directly linked to the People's Liberation Army, by the way, they should have declared that contact, or risk being found culpable.