There’ll be consequences if foreign adversaries launch cyberattacks against the US, the White House says.