BEFORE PRESIDENT TRUMP tapped Brett M. Kavanaugh to replace Justice Anthony M. Kennedy on the Supreme Court, the dark-money spigots were already beginning to open. As politics increasingly defines judicial nominations, confirmation battles for major judgeships are looking more and more like political campaigns, with shadowy groups pouring cash into national advertising and lobbying initiatives while keeping their donors and spending decisions opaque. This deprives Americans of information about who is backing nominees to some of the most powerful seats in the land, and it increases the likelihood that judges and politicians will feel pressure to make decisions that partisan spending networks demand.

Top on the list of major outside spenders is the Judicial Crisis Network, which pledged $7 million in 2016 for a pressure campaign to block Obama high court nominee Merrick Garland, plus $10 million the following year to help Neil M. Gorsuch get confirmed to the seat. The network has already announced it would spend $2.4 million on Mr. Kavanaugh’s confirmation. Like many big outside spenders, the Judicial Crisis Network is a registered 501(c)(4) nonprofit, a designation in the tax code created to benefit civic groups such as volunteer fire departments that has become a major vehicle for hiding political money. An analysis from the nonpartisan Center for Responsive Politics found that the network’s major donor has been the Wellspring Committee, which has links to a married couple that organizes conservative dark-money groups.

The Judicial Crisis Network is far from the only conservative outside spender active in the Kavanaugh fight. Americans for Prosperity, a group tied to the Koch brothers’ network, has promised a seven-figure effort. The Great America PAC and Great America Alliance, the latter a 501(c)(4), have pledged $5 million, in part because the groups’ strategists see the nomination battle as a way to rally Republicans before November’s midterm elections.

Liberal groups are also participating in the independent- spending frenzy. Demand Justice, a relatively new organization working against Trump judicial nominees, has promised to spend $5 million. The group is set up such that its funding is arguably even more opaque than the nonprofits against which it competes. According to the Center for Responsive Politics, Demand Justice’s fiscal sponsor is the Sixteen Thirty Fund. The fund did not respond to questions about its donors.

Congress should close the loopholes that enable organizations clearly created for big-money partisan politics to benefit from tax-exempt status and to disclose little information. Though this is primarily an issue involving political campaigns, it is clearly an increasing problem in judicial selection, both in places where judges are directly elected and where they are chosen by elected officials.

But the prospect for reform is dim. In the days when the corrupting power of money in government was an issue Congress appeared interested in addressing, Senate Majority Leader Mitch McConnell (R-Ky.) and other opponents of cracking down argued that spending restrictions were unwise but that everyone could agree to the second-best policy of requiring donor transparency. Now that transparency is the only thing lawmakers might conceivably demand, Mr. McConnell and his allies have opposed it.