Finally, nearly two years after the 2016 vote, members of Congress are getting closer to imposing a more robust deterrence policy. Two bipartisan bills have been introduced, one shepherded by Sen. Lindsey O. Graham (R-S.C.) and Sen. Robert Menendez (D-N.J.), and the aptly named DETER Act, whose leading co-sponsors are Sen. Marco Rubio (R-Fla.) and Sen. Chris Van Hollen (D-Md.). The Senate Banking and Foreign Relations committees held hearings Wednesday and Thursday in which witnesses such as former U.S. ambassador to Russia Michael McFaul and former undersecretary of state Nicholas Burns, both respected experts, endorsed a deterrence approach. “Putin’s a rational person,” Mr. Burns said. “He’ll understand that those are going to be the penalties; we’ve got to make sure that he perceives we’re serious about it.”

One idea is to meet future Kremlin aggression with tough, automatic sanctions. These could target the Russian energy sector, without which the country would not have much of an economy. Individualized sanctions could be aimed at top Putin cronies. Russian sovereign debt could be rendered radioactive in the West. President Trump could be legally required to impose these punishments.

On top of threatening massive automatic sanctions, Congress could give federal prosecutors more authority to go after botnets and cyber wrongdoers. One of the more creative suggestions is imposing new reporting requirement on large, suspicious real estate transactions, which might help crack down on foreign money laundering via cash purchases of expensive U.S. property.

The White House has been drawing up an executive order that might cover some of these bases, and senior administration officials have been working with members of Congress to craft a strategy with enough bite to satisfy lawmakers and enough flexibility to allay concerns in the executive branch about being locked into a long-term sanctions policy that might not be appropriate in future circumstances or one that inadvertently harms European allies. Given Mr. Trump’s past weakness on Mr. Putin, whatever policy that results must present the Kremlin with a sure, credible deterrent. To that end, it would be better if it were written into law rather than just an executive order.

It would also be better if it came sooner rather than later. As it stands, there is little time for deterrence before November’s vote. The message from now through 2020 must be clear and consistent.