How could we have an effective federal government if the execution of code is somehow exempt from their oversight? That would be a giant loophole.
Also, pretty certain the execution of a worm or other malicious software is likewise illegal, whether it be by the execution or the result.