Andy Coulson said he would have turned down Edward Snowden's leaked information if he had been offered it when he was editor of the News of the World.
He highlighted The Guardian's work with the man who revealed sensitive government secrets from the National Security Agency in the United States as an example of the debate over public interest reporting.
He would have regarded it as "potentially putting people's lives at risk", he said.
He told the hacking trial: "My rule of thumb on politicians, I felt News of the World readers had a right to know who someone in office, or who were seeking to get into office were, and what they were about."
He said he broadly took the same view when he went to work on the "other side of the fence" working as a Downing Street spin doctor.
But he went on: "I think that there are some other quite serious areas that are very difficult.
"For example Edward Snowden leaks ... as editor of the News of the World I think I would have turned them down.
"My view is there is potential for lives to be put at risk."
His comments to the hacking trial came the day after The Guardian and Washington Post shared the prestigious Pulitzer Prize for their coverage of secret surveillance by the NSA.
Coulson added that he thought it was "a bit rich" when celebrities courted the media to build their own brand then complained about stories they did not want to see published.
Coulson also today admitted he should have paid more attention to the use of the "dark art" of getting information from "phone traffic" while he was in charge of the tabloid.
He was asked about the "dark arts" while he was at the helm of the News of the World between 2003 and 2007.
Describing it as "investigative techniques", he told the Old Bailey it could include surveillance, using hidden cameras, following people, and potentially also "blagging".
But he said he thought it involved activities on the "legal side of the line".
Asked about the phrase "turning a mobile", Coulson said: "'Turning a mobile' or 'spinning a mobile' - these are phrases that I heard during my time as an editor.
"To me it meant getting an address from a phone number or getting a phone number from an address, or vice versa. And I believed there were perfectly legal ways of doing that."
The former Downing Street media adviser - who has denied knowing that the News of the World was responsible for hacking murdered schoolgirl Milly Dowler's phone - said the phrase "phone traffic" was one he had heard while at the tabloid.
He said it meant "getting information about who was phoning who by looking at phone billing".
"At the time I didn't give it enough thought," he told the court. "I can't sit here in 2014 and say that there was never a mention of phone traffic at the News of the World because I think there quite likely was.
"But equally, looking at it through my eyes today, I think that's an area I certainly should have applied my mind to more.
"I should have looked at it more, interrogated it more."
Asked about whether staff legal training in autumn 2004 would have been updated to include changes in the Press Complaints Commission's code of practice that included the illegality of intercepting people's voicemails made earlier that year, Coulson replied: "I would have expected it to embrace the latest version ... and the latest version of the Code had changed so the answer is yes."