Long ago and far away when the US first introduced classified info Non-Disclosure Agreements (NDA), I seem to remember that a clause therein was interpreted such that any work produced by a person who had signed such an agreement was subject to security classification review. I also seem to recall that the NDA was subsequently changed to modify/remove the offending language and we all had to sign new NDAs. For what it is worth, here's a link to the SF 312 (current US Govt NDA) briefing booklet from the Information Security Oversight Office of the US National Archives.