Could I patent harmful technology to prevent it from being put on the market?
I just saw a headline about Ford patenting a system to eavesdrop on passengers conversations to serve them related ads. If I had patented that before, could I stop it from being used?
If you're not going to take the effort type "can a government use patents" into Google and look at the top link. It took me less than a minute to find that government using a patent is just baked into the patent system. There's not additional law around it. So it might be better to go the WD 40 route and never actually file a patent to the formula to avoid sharing the formula publicly.