A voter casts his ballot in Staten Island on Nov. 6, 2012. (Keith Bedford/Reuters)

A MONDAY report from Yahoo News’s Michael Isikoff raised concerns that this year’s election will be rigged — though not in the way Donald Trump has predicted. Election systems in at least two states — Arizona and Illinois — have been compromised, seemingly by foreign hackers, possibly operating out of Russia or Iran. These revelations are only more worrying in light of the Russian government’s other apparent attempts to sway this year’s presidential election toward Mr. Trump, such as the hacking of the Democratic National Committee and subsequent leaking of party documents.

In fact, for the moment, the news does not suggest that foreign governments are rigging the election, or anything close. Without evidence of deeper penetrations, the latest revelations amount to little more than a warning. Election systems have vulnerabilities. Government officials and perhaps Congress can and should do more to ensure the integrity of the ballot box.

In both states, hackers appear to have been interested in taking rather than changing information stored on state systems, penetrating election databases containing voter information. Even then, they managed to extract information — up to 200,000 voters’ personal data — only in the Illinois case. In Arizona, election officials discovered malicious software before any data was taken. Though election tampering might be a motive, the penetrations could have simply been in service of petty crime — hackers gathering personal information to commit identity theft.

U.S. elections are hackable, though it is much harder than some appear to believe. There are three main areas of vulnerability, according to Andrew Appel, a Princeton University computer scientist. Hackers could tamper with voter records, removing names from official rolls. They could attack electronic voting machines. And they could disrupt the proper tallying of voting results as they are collected from various precincts.

In each case, one key to ensuring integrity is creating a paper trail that can be matched to the electronic records. Electronic voter rolls can be checked against paper ones; electronic vote counts can be compared to paper ballots filled in during the voting process; statewide vote tallies can be checked by examining and adding the results reported publicly in each precinct.

Most places have voting machines that leave a checkable paper trail, but there are some counties that do not. Hacking these machines would take some real work — hackers would have to get a virus onto special cartridges used to input election information to the devices — but election officials should consider machines without paper functionality to be unacceptable and replace them as soon as possible.

At the moment, the biggest threat to the integrity of U.S. elections appears to be that politicians, Mr. Trump in particular, will use anecdote and innuendo to stoke a crisis of confidence. Given that Mr. Trump has already indicated he will not accept the legitimacy of an election that ends in his defeat, even a well-functioning electoral system in which any attempted hacks and other frauds are caught and corrected could look to many like a sham. Americans should demand strong electoral safeguards without surrendering to this sort of dangerous cynicism.