"Is there a ruling that allows them to do that? I've always wondered if there was ever a fight over what constitutes reasonable search for a regulatory agency."
Well, a regulatory agency almost by definition is a law enforcement agency, since it is given its tasking under some law or other and charged with enforcing it. And a LEA is certainly able to request and obtain a search warrant where it has probable cause to believe that someone is in violation of the law. (Non-gun example: the FCC can obtain a warrant if it has probable cause to believe someone in a home is operating an unlicensed radio transmitter.)
I doubt anyone, except possibly the more extreme Libertarians, would say that a LEA should not be able to conduct reasonable searches under a warrant; their "right" to do so is in the Constitution itself.