The U.S. intelligence community said it has observed foreign adversaries scanning election infrastructure ahead of the contentious November election, raising concerns that hostile powers are probing America’s defenses for any vulnerability.