As President Trump intensified his public campaign Monday against the whistleblower whose anonymous complaint about the commander in chief helped spark an impeachment inquiry, legal analysts warned the person might soon face a grim reality.

Federal laws offer only limited protection for those in the intelligence community who report wrongdoing — even when they follow all the rules for doing so. Trump and his allies, analysts said, might face few, if any consequences, for outing the whistleblower or otherwise upending the person’s career.

“If he wants to destroy this person’s life,” said whistleblower attorney Bradley P. Moss, “there’s not a lot to stop him right now.”

While the acting director of national intelligence told lawmakers last week the whistleblower had acted in good faith and should be protected, Trump has seemed to suggest the opposite.

On Monday, Trump tweeted that the whistleblower’s complaint — which revealed Trump had pressed his Ukrainian counterpart to investigate Democratic presidential candidate Joe Biden — was “not holding up.” He also said he was “trying to find out” about the whistleblower’s identity.

“The Whistleblower knew almost nothing, its 2ND HAND description of the call is a fraud!” Trump wrote on Twitter.

The statements came two days after Andrew P. Bakaj, a lawyer representing the whistleblower, sent a letter to the acting director of national intelligence expressing fears for his client’s safety.

Bakaj said Monday, “The Intel Community Whistleblower is entitled to anonymity. Law and policy support this, and the individual is not to be retaliated against. Doing so is a violation of federal law.”

The intelligence community inspector general deemed the whistleblower’s complaint credible, despite the person conceding much of the information was secondhand. On Monday, the inspector general’s office issued a lengthy statement explaining how it came to that decision.

The statement noted the whistleblower had “official and authorized access to the information and sources referenced” in the complaint, direct knowledge of some conduct and “subject matter expertise.”

The inspector general’s office also seemed to dispute an allegation, which Trump had seized on, that the rules for whistleblower complaints were recently changed to allow secondhand information to be passed on. That assertion seemed to be based on reporting in the Federalist, which found a previous whistleblower complaint form with the heading, “FIRST-HAND INFORMATION REQUIRED.”

The law never had such a requirement. But in its statement, the inspector general’s office conceded previous forms and accompanying informational materials “could be read — incorrectly — as suggesting” that it did. The inspector general’s office said it had since developed new forms that were more accurate.

Whistleblowers in the federal government have long had limited remedies if they face retaliation for reporting wrongdoing, and those in the intelligence community have even fewer than their counterparts in other agencies. The 1998 Intelligence Community Whistleblower Protection Act did not actually detail any protections for whistleblowers from retaliation — instead merely describing the process to make a complaint.

The law, though, was later bolstered with a presidential policy directive spelling out how intelligence community inspectors general could seek to determine if a whistleblower faced retaliation and recommend corrective action, if so. The directive was formally put into law in 2014.

Notably, analysts said, the law puts the president in charge of enforcement — which is particularly ironic in this case, given Trump is the subject of the complaint.

“So, what kind of protection is this whistleblower going to get through this system?” said David K. Colapinto, the co-founder of the National Whistleblower Center. “But you got to understand that prior to 2014, there was nothing on the books. This is considered an advancement.”

If whistleblowers are fired, demoted or otherwise punished, they can now at least pursue internal remedies, though they cannot go to court, Colapinto said. Such cases, he said, “usually end poorly for the whistleblower.”

“From our point of view, protecting the whistleblower is of paramount importance, and this case is going to be a real test of these laws to see if they can make them work,” Colapinto said.

If the whistleblower’s identity was itself protected as a government secret, executive branch officials who disclosed it could be subject to criminal investigation for leaking national security information — not unlike when CIA officer Valerie Plame’s identity was disclosed publicly in the George W. Bush administration, legal analysts said.

If it were not, government officials who revealed it could be accused of violating the privacy act, Colapinto said. That is a misdemeanor crime that comes with a $5,000 fine, though the officials could also be sued.

Colapinto said his firm pursued such a case when Defense Department officials were accused of disclosing information from the background investigation of Linda Tripp, who secretly recorded conversations with Monica Lewinsky, a former White House intern, about her sexual relationship with President Clinton. The government, Colapinto said, ultimately settled for $595,000.

But Moss said the act is virtually never enforced criminally, and it also does not apply to members of Congress who might be motivated to disclose the whistleblower’s name.

“This is all very, very fragile, and a lot of the protections that we understand to exist are based more on courtesy and custom than anything written down in law,” Moss said.

Moss is the law partner of Mark Zaid, one of the whistleblower’s attorneys, though he is walled off from that case.

Devlin Barrett contributed to this report.