CNN  — 

Christopher Krebs, the former top administration official for cybersecurity who was fired by President Donald Trump, told a Senate committee Wednesday it was “dangerous” for elected officials to embrace false and baseless attacks on the 2020 election and undermine public confidence in the result.

“I think we’re past the point where we need to be having conversations about the outcome of this election,” Krebs told the Senate Homeland Security and Governmental Affairs Committee. “I think that continued assaults on democracy and the outcome of this election, that only serves to undermine confidence in the process, is ultimately corrosive to the institutions that support elections.”

Krebs, who did not mention Trump specifically, was fired by the President last month after the agency he led, the Cybersecurity and Infrastructure Security Agency, pushed back against the President’s baseless claims of widespread fraud in the election. In his prepared remarks, Krebs said that the “current wild and baseless domestic claims of hackers and malicious algorithms flipping the vote in states across the country due to ties to deceased foreign dictators serve only to confuse, scare, and ultimately undermine confidence in the election.”

“While elections are sometimes messy, this was a secure election, of that I have no doubt,” Krebs said.

Krebs testified Wednesday at a controversial hearing convened by Senate Homeland Security Chairman Ron Johnson, which comes one day after Senate Majority Leader Mitch McConnell said plainly that Joe Biden was the President-elect and privately urged Republican senators not to join in an expected House challenge to the election results next month when Congress counts the Electoral College votes.

Johnson, a Wisconsin Republican, said Tuesday he wasn’t planning to dispute the results during the joint session of Congress, but he defended his decision to hold Wednesday’s hearing on election “irregularities.” In his opening statement, Johnson ticked off various allegations of fraud, criticizing Democrats for attacking him over the hearing when they’ve raised questions about vote counting in previous elections.

Still, Johnson did not say he was trying to dispute the outcome, saying that the question was “whether the level of fraud would alter the election.”

“This year, in dozens of court cases, through the certification process in each state and by the Electoral College vote, the conclusion has collectively been reached that it would not,” Johnson said.

Michigan Sen. Gary Peters, the top Democrat on the committee, said that Wednesday’s hearing was dangerous when many Republicans have failed to acknowledge Biden’s win and promoting baseless attacks on the election.

“Whether intended or not, this hearing gives a platform to conspiracy theories and lies, and it’s a destructive exercise that has no place in the United States Senate,” Peters said in his opening statement.

In addition to Krebs, the hearing’s witnesses included two Trump campaign lawyers who tried to overturn the election results in Nevada and Wisconsin and a Republican Pennsylvania state representative, as well as former independent counsel Kenneth Starr, who was part of Trump’s impeachment defense.

Senators in both parties raised concerns that the hearing is promoting debunked conspiracy theories about the election, and one Republican senator did not participate. Trump has continued to spread baseless and false claims about fraud in the election and ignored Monday’s Electoral College vote that affirmed Biden as the winner of the presidential election, 306 electoral votes to 232.

“We have a process in this country, under the Constitution and our judicial system, which should be followed,” Sen. Mitt Romney, a Utah Republican who is not participating in the hearing, told CNN last week. “The idea of trying to change that process or interrupt it is, in my opinion, a grave mistake.”

Sen. Ron Johnson, Republican of Wisconsin.

Several of the witnesses who testified Wednesday – James Troupis, who represented the Trump campaign in Wisconsin; Jesse Binnall, who was Trump’s attorney in Nevada; and GOP Pennsylvania state Rep. Francis Ryan – repeated many of the same claims about the election results that have been dismissed repeatedly in the courts as the Trump’s challenges have been rejected.

Johnson’s committee has been no stranger to controversy this year. His committee released the findings of its investigation into the business dealings of Biden’s son, Hunter Biden, during the fall campaign, which Romney also criticized as a political move.

And last month, he invited a vaccine skeptic who has promoted the use of hydroxychloroquine to treat Covid-19 patients – despite the Food and Drug Administration stating that it should not be used to treat coronavirus patients – to testify at a committee hearing.

Johnson and Peters clashed Wednesday over the committee’s probe into Ukraine, in which Democrats charged that the committee had taken Russian disinformation from Ukrainian officials with ties to Russia, while Johnson responded that it was Democrats spreading disinformation.

Next month, Congress will formally count the Electoral College vote on January 6, a process where a group of House Republicans are planning to object to the results in states Biden won. It’s a challenge that can only delay the inevitable, but if a Republican senator joins the objections, the two chambers are required to debate and vote on whether to uphold the challenge.

Johnson said ahead of Wednesday’s hearing that he was not planning to challenge the results on the floor.

McConnell on Tuesday urged Republican senators on a private conference call not to join House members to object to state electoral results, a source on the call told CNN. Other top Republicans, including Senate Majority Whip John Thune and Senate Rules Chairman Roy Blunt, echoed that sentiment. Doing so, they said, would be fruitless and force them to cast a politically challenging vote against the President that day.

This story has been updated with additional developments Wednesday.

CNN’s Suzanne Malveaux, Geneva Sands, Manu Raju and Ali Zaslav contributed to this report.