President Reagan said today that leaks of secret national security information have "endangered" U.S. foreign relations, and he chided newspaper publishers for overlooking the "good news" of economic recovery and increased American voluntarism.

In response to a question about leaks at the American Newspaper Publishers Association's annual convention here, Reagan said, "I can tell you there have been incidents that are very serious.

"I don't know what is in the mind of the person who leaks something of a classified nature that suddenly finds you having to get on the phone or start the cables back and forth because actually they have endangered our relationship with some other country," Reagan said. He offered no specifics, but said "this has taken place" during his term. A White House official said no details would be provided.

"And so I really am pretty upset about the leakers," Reagan said. "But with regard to national security, we are not doing anything I think unfairly imposes a restriction on the right of the people to know or the freedom of information as you of the press are concerned . . . . We're not trying to hide anything that shouldn't be hidden."

Although his comments about the national security leaks were mostly in a somber vein, Reagan also also gave the subject the light treatment.

"You must realize that sometimes the morning papers come to me with breakfast and I get surprised at some of the things I'm doing myself," he said. And, in a separate interview with Gannett News Service, published today, Reagan joked that he's thought about using the "guillotine" as a solution to White House leaks, "but I will stop short of that."

The president mistakenly told the publishers that "the law provides" for a three-year prison penalty for "someone who releases classified information." White House spokesman Larry Speakes said later that Reagan was referring to a proposal now under consideration by the Justice Department.

Reagan's complaint about leaks came after a midday speech in which he lightly scolded the publishers for newspaper coverage of the recent recession. "The generosity and compassion of most Americans toward those who suffered . . . . deserves a little more news coverage than it has received," he said.

In offering a litany of the "good news" about economic recovery and voluntarism, Reagan recounted how, with two telephone calls, he helped find a donor of 3,000 pounds of flour for a canteen in Ghana run by a Peace Corps volunteer.

Describing this story as "newsworthy," the president said, "It's true that one approach to the news is the man-bites-dog principle. If it's unusual, bad or bizarre, then it's newsworthy. Maybe there's another kind of news as well, the kind that lifts our spirits by providing insights into the kind of people we are the kind of society that we live in."

On another question of fairness in news reports, Reagan complained in the Gannett interview that there has been a "constant drumbeat" in the press "charging that there is excessive spending" in the military.

Noting how public opinion has shifted away from his defense buildup since the 1980 campaign, Reagan said Americans have been "told over and over again that there is waste and extravagance" in Pentagon spending. He blamed the negative reports on both the press and his political opponents.

On the matter of leaks, Reagan acknowledged to the publishers that some don't involve national secrets. As he has before, Reagan blamed low-level administration officials who leak options "and suddenly we are reading in the press or hearing on television that this is what we are going to do."

Earlier today, Reagan honored a group of New York residents who had participated in a program run by the New York Daily News to highlight individuals who thwart criminal acts.

"Every one of them had performed a heroic deed at the risk of his or her life," he said, later detailing for the publishers the heroic deeds. "And yet you looked and you said, this is just Americana. There must be something right about this society of ours."