Slight aside, I remember reading a post here on HN; the poster said they created an astronav system for use with webcams and published the code on github, only to receive on knock on their door a little while later from somebody who explained that this code in fact violated ITAR restrictions and they needed to remove it.
Would that hold up in court if the person were willing to challenge it? That seems a clear cut violation of that person's speech, but I guess anything for "national security".