>How do you avoid thus when it comes to national security?
You can't. The notion that you can know everything your organization does is ridiculous and naive. It might work if you restrict yourself to tiny companies, but it doesn't if you ever work for the government or any sizable company.