But Marcy Wheeler, who writes a well-regarded national security blog, not only revealed a source — she did so to the FBI, eventually becoming a witness in special counsel Robert S. Mueller III’s investigation of President Trump’s possible connections to Russia.

“On its face, I broke one of the cardinal rules of journalism, but what he was doing should cause a source to lose protection,” Wheeler told me in a lengthy phone interview.

“It’s not a decision I regret,” she added.

That she did so, as detailed in a post last week on her emptywheel blog, stunned those who have followed her work because she has so frequently criticized American intelligence agencies and their penchant for surveilling U.S. citizens.

“For her to go to the FBI, that made my jaw drop,” said Daniel Drezner, a Tufts University professor of international politics. (He doesn’t know her personally but has followed her work.)

“It’s like Glenn Greenwald calling up the CIA and saying I’ve discovered a mole,” Drezner said. (He was referring to the Pulitzer-winning, anti-surveillance, civil liberties lawyer who is co-founder of the Intercept, which focuses on national security news.)

Wheeler hasn’t named the source publicly, though his name may soon be known to all who are following the Mueller investigation.

But her dealings with him have brought her around to believing something she initially questioned: that Russian interference in the 2016 election was a very real thing, and that Trump associates played a part.

What exactly did the source do to deserve outing to the FBI, in her view? Wheeler is circumspect in describing that.

Her blog post centers on a text message she says she got from the source on Nov. 9, 2016 — about 14 hours after the polls closed — predicting that Michael Flynn, who would be Trump’s appointee for national security adviser, would be meeting with “Team Al-Assad” within 48 hours.Russia has been perhaps the Assad regime’s staunchest ally.

As she noted: “The substance of the text — that the Trump team started focusing on Syria right after the election — has been corroborated and tied to their discussions with Russia at least twice since then.”

Wheeler won’t say when she went to the FBI other than that it was in 2017. In December 2017, Flynn flipped, pleading guilty to one count of lying to the FBI about his contact with the Russian government during the presidential transition; Trump had fired him in February.

In addition to the knowledge of her source’s inside information, Wheeler said, she had reason to believe that the source was involved with efforts to compromise her website and other communications. And perhaps most important, that he was involved in cyberattacks — past and future — that had done and could do real harm to innocent people.

Wheeler, who has written blog posts about national security for almost 15 years, is clear that she wasn’t motivated to talk to the FBI because she is out to get Trump. She certainly doesn’t like him, but she is also not at all a Hillary Clinton fan.

But what motivated her recent revelation that she went to the FBI has plenty to do with politics: She is disgusted by the way House Republicans are, in her view, weaponizing their oversight responsibilities and making it all too likely that FBI informants will have their names revealed — and their safety threatened.

“It infuriates me,” she wrote, to observe the “months-long charade by the House GOP to demand more and more details about those who have shared information with the government . . . all in an attempt to discredit the Mueller investigation.”

But as a public figure, she has a measure of protection that others who have come forward don’t have.

“If something happens to me — if someone releases stolen information about me or knocks me off tomorrow — everyone will now know why and who likely did it,” she wrote.

Overly dramatic? Not really. The Russians do have a penchant for disposing of people they find threatening.

Both decisions — to talk to the FBI and to write about it — required her wrestling with three main issues; concerns about journalistic ethics, the possibility of unintended national-security consequences, and the growing certainty that her suspicions about the source were true.

As a writer working without a newsroom, she had no editor with whom to talk but did consult with a number of lawyers before making her initial decision.

A priest or minister who hears a confession about a serious crime that has already happened, she said, can offer forgiveness. But one who hears of a serious crime in the making is morally required to inform police. She saw herself in that latter category.

Wheeler told me she believed herself to be “uniquely informed” about something that mattered a great deal.

In their reporting, journalists talk to criminals all the time and don’t turn them in.

Reporters aren’t an arm of law enforcement.

They properly resist subpoenas and fight like hell not to share their notes or what they know because doing so would compromise their independence and their ability to do their work in the future.

Wheeler knows all that — and believes in it. But she still came forward, not because of a subpoena but because of a conscience.

As Drezner told me, “She would not do this on a whim.”

And as Wheeler put it, “I believe this is one of those cases where it’s important to hold a source accountable for his actions.”

Without knowing all the details, it’s hard to judge whether she was right.

But it’s not hard to see that her decision was a careful and principled one.