Robert Mueller must tread carefully when investigating President Donald Trump because of his past ties to James Comey, former DOJ official John Malcolm told CNBC on Thursday.

"Bob Mueller has an excellent reputation," Malcolm, former deputy assistant attorney general under the George W. Bush administration, said on "Squawk Box." "He's got to be a little bit careful because there is no question that he is close to Jim Comey. He dealt with him every day when Comey was deputy attorney general."

"He must keep an arms length distance from Jim Comey," Malcolm said but added he personally isn't concerned about Mueller's handling of the investigation.

Mueller and Comey had worked closely together in the George W. Bush administration when Mueller was FBI director and Comey was deputy attorney general from 2003 to 2005.

With Mueller maxed out and required to leave his post, President Barack Obama plucked Comey from the private sector and appointed him FBI director in 2013.

Malcolm, who worked for Trump's FBI director pick, Chris Wray, when Wray was head of the DOJ's criminal division, spoke after a Washington Post report said Mueller's investigation has now widened to determine whether Trump attempted to obstruct justice.

People familiar with the matter told the Post that the obstruction of justice probe started in the wake of Trump's firing of Comey. The New York Times later reported Mueller is seeking interviews with three high-ranking foreign intelligence officials.

Matthew Miller, who was the DOJ chief spokesman under Attorney General Eric Holder, said he isn't surprised Mueller is taking aggressive steps in the investigation. Miller said it could be in Trump's best interest if Mueller moves quickly with the probe.

"Whether you're a supporter of the president or an opponent of the president, you ought to want Mueller to get the truth and get to the truth quickly," he said.

He said the investigation could get dragged out if people of interest refuse to cooperate or if Trump uses executive privilege.