That doesn't apply when it comes to giving "aid and comfort to the enemy" during wartime. Like tipping off the enemy to giant sting operations. There is no right of freedom of the press to endanger the United States and its inhabitants.
None dare call it treaon, but that is what it is.
Newspapers will typically withhold information if there is a compelling national security reason to do so. The problem, in this case, appears to be that no one asked them to hold the name back.