Congressional Republicans have finally done it: Both the House and Senate passed tax legislation. The bill has now headed to President Trump’s desk for his signature.

Most dissection of the plan has focused, for obvious reasons, on the way it changes our tax bills. The Tax Policy Center found that in the first years most people would get a tax cut, although the biggest cuts are reserved for the wealthiest. By 2027, lower- and middle-income Americans would get no benefit or actually pay more in taxes.

But this bill also serves as a setup for steep government cuts. Programs from Medicare to flood insurance to food stamps will be at risk the moment President Trump’s signature dries. Some reductions would be inflicted automatically. Others, Republicans will pursue with a handy justification — the revenue hole created by their own legislation.

Under the Pay-as-You-Go Act of 2010, or Paygo, the Office of Budget and Management has to order automatic spending cuts if legislation passed by Congress is set to increase the deficit and the rules aren’t waived or the loss isn’t covered by new revenue. According to a Congressional Budget Office analysis, spending cuts would have to total $136 billion for a bill, such as the tax legislation, that increases the deficit by $1.5 trillion over a decade.

What would get cut? Some programs, like Social Security and unemployment benefits, are spared. But plenty of others are seriously exposed. While there are limits on how much Medicare would be pared back, it would still be slashed by $25 billion.

The rest of the $111 billion would have to come from other mandatory government programs, and because most have no protection, they would be reduced to barely any funding or nothing at all. That includes block grants for things like Meals on Wheels, farm aid like the crop insurance fund, the Temporary Assistance for Needy Families program and the National Flood Insurance Program.

Some of the reductions would be huge: the Department of Justice’s Crime Victims Fund, which gives states money to help victims with medical expenses and counseling, faces a $13.5 billion cut. Others have sources of funding that aren’t subject to Paygo but still take a hit, like the Women, Infants and Children program that provides food to low-income mothers and would be cut by $1 million.

Some cuts would probably rankle Mr. Trump as much as anyone else. Border protection would face a potential $1.3 billion cut. Immigration and Customs Enforcement would be slashed by $318 million. H-1B visa fraud protection would be cut by $45 million.

All of this happens without Congress lifting another finger. The Republican leaders Mitch McConnell and Paul Ryan have claimed that Paygo cuts won’t happen because Congress will waive them. But that requires help from Democrats, who have been completely shut out of tax reform and may have little appetite for cooperation.

Many Republicans have claimed that the tax bill won’t cost the government any extra money. The Treasury Department put out a one-page paper on the Senate-passed version that said it would be paid for by economic growth. But the threadbare analysis was able to come to that conclusion only by assuming that Congress passed other legislation, such as an infrastructure bill.

All nonpartisan analyses say otherwise. The conservative Tax Foundation found that the Republican bill will reduce government revenues by $1.47 trillion over a decade, and even assuming growth helps cover the cost it would still come up $448 billion short. The Penn Wharton Budget Model finds that it will cost at least $1.8 trillion over 10 years. The nonpartisan Joint Committee on Taxation found that the Senate-passed version — which differed a bit from the final legislation, but not enough to radically change the numbers — would not pay for itself, costing about $1 trillion.

If these models are right and the bill does add to the deficit, Republicans have already said they’ll cut government spending further.

Jeb Hensarling, Republican of Texas, has insisted that the cost of the tax bill will be covered by economic growth. But, he told Bloomberg, “If not, as a Republican, the answer would be less spending, not more tax.”

Others have admitted that no matter what happens, they’ll call for spending cuts. Marco Rubio told an audience in late November that tax reform is only one side of the Republican plan; the other is to reduce government programs: “You are still going to have a debt problem in the absence of spending cuts.”

Mr. Ryan sounded the same note, saying, “We’ve got a lot of work to do in cutting spending.” Mark Sanford, Republican of South Carolina, was even more blunt. Will the tax bill “help on the margin? Yes. Will it do as much as people advertise? Probably no,” he said. “The real conundrum that we still have to deal with if you really care about debt and deficit is spending.”

Republicans so far haven’t decided exactly what will get the ax. “We’re going to have to get back next year at entitlement reform, which is how you tackle the debt and the deficit,” Mr. Ryan recently said, specifying “health care entitlements” in particular. Orrin Hatch singled out “liberal programs” for the poor.

That could mean a lot of things, but Medicare, Medicaid and Social Security are all at risk when so-called entitlements are on the cutting board.

Others, including Mr. Ryan, are also focused on what they’re calling “welfare reform,” or changes to anti-poverty programs. “For us to achieve 3 percent G.D.P. growth over the next 10 years from tax reform, we have to have welfare reform,” according to Rod Blum, Republican of Iowa.

The president is also on the welfare reform bandwagon. “We’re looking very strongly at welfare reform, and that’ll all take place right after taxes, very soon, very shortly after taxes,” he said in November.

Republicans will almost certainly focus on instituting work requirements in programs where they don’t already exist, namely Medicaid and food stamps. But most adults on Medicaid already work; those who don’t are primarily people with an illness or disability, caring for family members, in school, or retired. A work requirement will simply take health coverage away from them. Similarly, many childless adults already have to work to get food stamps. Stricter requirements will kick very poor people off the program who tend to struggle with finding a job anyway. Existing work requirements don’t help people find jobs, but simply penalize them.

Republican leaders have wanted to do this for a long time. Mr. Ryan has been salivating over cutting Medicare, Medicaid and Social Security for as long as he’s had a political career. Mr. Trump’s 2018 budget proposal, released well ahead of the tax legislation, named “welfare reform” one of its core pillars.

But now that they’ve succeeded in passing a tax package that will reduce government revenues so much, the ensuing cost will serve as the excuse to get everything else they want. They’ll count on our short memories to forget who created larger deficits in the first place. Those deficits will serve as the motivation to enact cuts they’ve sought all along. The tax bill isn’t just a regressive giveaway to corporations and the rich. It’s a Trojan horse with deep government reductions stuffed inside.