Editor’s Note: Samantha Vinograd is a CNN national security analyst. She served on President Obama’s National Security Council from 2009-2013 and at the Treasury Department under President George W. Bush. Follow her @sam_vinograd. The views expressed in this commentary are her own. View more opinion articles on CNN.

CNN  — 

By putting a “for sale” sign on his forehead – and indicating that he’s open for business when it comes to receiving dirt on his political rivals – President Donald Trump is encouraging foreign governments to attack his political opponents.

We know that Russia used various tools to attack Hillary Clinton - and then laundered that stolen information through organizations including WikiLeaks as part of an information warfare campaign. No one, especially the President, who has access to the most sensitive intelligence in the world, can claim ignorance about how Russia attacked Clinton.

 Sam Vinograd

Rather than learning from what happened, Trump is encouraging Russia and potentially others to do more of the same. This opens up every candidate - and perceived Trump rival - to attacks from hostile foreign powers.

President Trump’s latest comments, during an ABC News interview, indicating that he would consider accepting negative material on political opponents from foreign governments, and that he wouldn’t necessarily report the contact to the FBI, are just the latest in a long line of counterintelligence red flags. Trump said, “There isn’t anything wrong with listening.”

It is unclear whether the FBI has an ongoing counterintelligence investigation into President Trump. But if they don’t, they may want to revisit why not.

It is unclear how a foreign government would contact Trump without other US government officials knowing - presidential communications are supposed to be on official devices that preserve communications, and typically members of the White House team listen in on presidential calls or at least get transcripts.

His comments are a worrisome indication that he’s open to connecting with foreign governments without his own team knowing. That’s a violation of the Presidential Records Act, which requires that all White House communications be archived, and a major counterintelligence misstep because it means foreign governments could know more than our own does.

By indicating that he’s open to receiving help from foreign governments - despite troves of open source information indicating that Russia was trying to interfere in our 2016 election to advance its own agenda - the President’s penchant for undercutting his home team continues to march forward.

Although FBI Director Christopher Wray has stated publicly that campaigns should report foreign contacts, the President said during the ABC News interview that getting dirt on a political opponent from a foreign government was called “oppo research,” and that it was not interference. He went on to say that “The FBI doesn’t have enough agents to take care of it.”

This isn’t the first time that Trump has shown that he thinks that he knows it all when it comes to intelligence, but this time he’s directly undercutting Wray while also undermining our national security.

Stay up to date...

  • Sign up for CNN Opinion’s new newsletter.
  • Join us on Twitter and Facebook

    Why the President thinks he knows better can be attributed to a likely sense that foreign governments helped his 2016 campaign and could do so again. Russian intelligence services leveraged either the naivete or the narcissism of the Trump 2016 campaign to advance their agenda of undermining our democracy. And their preference for candidate Trump has probably grown stronger over the last few years because he has consistently done some of their work for them - like spreading divisions and misinformation and undercutting the credibility of our institutions.