THE MASSIVE leak of documents from the campaign of Emmanuel Macron failed to prevent his landslide victory Sunday in the French presidential election. But perhaps his defeat was not the goal of the leak. Mr. Macron already had a wide lead when the files were posted on the Internet Friday night, the result of a hack that cyber-experts said bore the fingerprints of a group tied to Russia’s military intelligence service. Nor did the archive appear to contain much in the way of compromising information.

What was most striking about the operation was not its impact on the election, but its sheer audacity. The Russians who participated in the attack appeared unconcerned about disguising their identity; experts reported that one modified an Excel worksheet using a Russian version of the software. It was as if the regime of Vladi­mir Putin wanted to send a bald message to Western democracies: We can hack your election systems and have no inhibitions about openly doing so.

That’s why it is essential that Western governments respond forcefully and effectively to the intrusions. Russia must be deterred from waging cyberwar against core democratic institutions of the United States and its NATO allies.

An appropriate response must begin with full investigation and disclosure. Congressional investigations into the hacks of the Democratic National Committee and Hillary Clinton’s presidential campaign, which the U.S. intelligence community concluded also originated with Russian intelligence, must be comprehensive, and the results made public.

Both in the United States and France, the attacks were facilitated or amplified by the WikiLeaks website and a broad network of social -media users and bots; among the biggest sharers of the Macron leak were Americans associated with the white-nationalist alt-right movement. More light must be shed on the connections, if any, among those private networks, WikiLeaks and Russian intelligence, as well as any ties between Western political campaigns and Moscow. Marine Le Pen, Mr. Macron’s neo-fascist opponent, traveled to Moscow to meet Mr. Putin during the campaign and spoke publicly about what Mr. Macron says were fabricated reports that he holds an offshore bank account.

The Obama administration responded to Russia’s interference in the U.S. election with sanctions on a few individuals and the shutdown of a couple of Russian compounds in the United States. The intervention in France, and reports of similar meddling in Germany’s upcoming election, show that the Kremlin has not been chastened. What is needed are measures that will get Mr. Putin’s attention, such as collective economic sanctions by European Union and NATO member states. Another worthwhile response would be disclosure of intelligence information on Mr. Putin’s personal corruption and that of the elite surrounding him.

The encouraging news is that Russia’s hacking operations appear to be yielding diminishing returns. Western news outlets and their consumers are becoming wise to Moscow’s tactics: In France there has been more attention paid to the authors of the Macron hack and the network that promoted it than to the disclosed files. Moscow’s influence operations will fail when Western publics understand them for what they are: cold war by 21st-century means.