The 2016 presidential ballot. (Matt Rourke/AP)

WHETHER PRESIDENT Trump obstructed justice is a crucial question, the answer to which special counsel Robert S. Mueller III implied but did not state clearly. What is crystal clear in his 448-page report is a conclusion that Mr. Trump, charged with making the highest-level national security decisions, has routinely denied: “The Russian government interfered in the 2016 presidential election in sweeping and systematic fashion.”

One reaction from Congress must be to weigh the evidence of obstruction. The other must be to ensure that Russia — and any other hostile actor — does not succeed in interfering again.

Mr. Mueller, confirming the long-standing conclusions of the U.S. intelligence community, found that the Kremlin ran a social media campaign that evolved from a program “to provoke and amplify political and social discord in the United States” and “to sow discord in the U.S. political system through what it termed ‘information warfare’” into one “that favored presidential candidate Donald J. Trump and disparaged presidential candidate Hillary Clinton.” Meanwhile, Russian military intelligence hacked the Democratic National Committee’s servers and the Clinton campaign, then released damaging material at strategic times.

It remains outrageous that Mr. Trump, having benefited from the Kremlin’s meddling, continually plays down Russia’s election-year activities — and, indeed, has pursued a closer relationship with Russian President Vladimir Putin — even while the leaders he picked to run the U.S. intelligence community repeat that Russia is culpable and likely to try again.

There are two approaches to defending against further intrusions. First is deterrence, which relies on making hostile actors think twice about trying to meddle. Congress passed a raft of retaliatory sanctions over Mr. Trump’s objections following the 2016 affair, which was a start, and the president later issued an executive order promising other retaliatory measures that would harm the economy of any government that tried in the future to interfere.

Under normal circumstances, the executive order might be enough. But Mr. Trump’s persistent affinity for Mr. Putin means that he cannot be trusted to follow through. Congress should write into law that the U.S. government must retaliate against any fresh foreign attack on our democracy. Sens. Marco Rubio (R-Fla.) and Chris Van Hollen (D-Md.) reintroduced this month their DETER Act, which would do this.

The other strategy is hardening the country’s democratic infrastructure against any attempted intrusion. Mr. Trump should have made this a high priority when he entered office. Instead, he focused attention on phantom voter fraud. More recently, his obsession with restricting immigration has stoked chaos at the Department of Homeland Security, which is responsible for domestic cybersecurity — particularly after he purged its leadership.

There is no reason to expect the Russians would stop at what they did before; Moscow can be expected to exploit other vulnerabilities its hackers identified. Mr. Mueller’s report found that they infiltrated a company that made commonly used voter roll software, and seem to have penetrated Florida election administration networks. Just one election administration hack in a close swing state could throw the country into chaos.

Counties and states must continue tightening up their systems, which means buying new voting equipment that leaves paper trails, shoring up security around electronic voter rolls, insisting on statistically valid post-election audits of paper records and checking on contractors’ security measures. That will all take money — which Congress should give them.