I imagine that is defeated by simply saying "I refuse to lie", which could be career suicide but it's still an option. I can see how legally they could say "you can't reveal that information, it's a matter of national security" but I don't quite think we're at the point in America where they can go "Say this or go to prison".