The potential for foreign cyberattacks to shape U.S. elections has been in the spotlight as special counsel Robert Mueller’s report outlined efforts made by Russia to steal thousands of emails and internal documents from the Democratic Party and the Clinton campaign in 2016.