That's the problem with time travel. You can't really keep it a secret. The mechanics are based on the laws of nature in theTrek universe and because of that, will be eventually discovered by other races. Or enemy spies will manage to steal that information. It's like the atom bomb: once the genie is out of the bottle, you can't put it back in.
That's sort of the analogy I had in mind in my DTI novels. You can't make it illegal in the US to study nuclear physics or to publish the instructions for making a bomb, but it's illegal to possess nuclear material -- or any kind of explosives -- without a license. So they can't stop you from knowing how to do it in theory, but they can stop you from gathering the means to do it in practice.
Granted, it's a trickier issue when dealing with other governments, but that comes down to diplomacy and treaties. I think most rational governments would agree to mutual bans on time travel, due to the risk to their own histories -- and the risk of a temporal arms race. Although as we've seen, in the long run that doesn't prevent the development of time travel so much as keeping it covert, a cold war using proxies.