Any freelancer should know that signing an NDA and touching any proprietary code puts him in danger.
And better do not work with companies which want to keep their code secret.
There should be big difficulty for the companies that do not publish their code under some kind of OpenSource license to get skilled developers.
Of course this case doesn't place employed developers in danger. They cannot disclose the code, which they touch only in the office.