The Miami Herald has been struggling with that for some time now. It's interesting to read a column they published on Monday about the issue.
The column was written by Edward Wasserman, the Knight professor of journalism ethics at Washington and Lee University, and is about publishing "good stories from bad sources" and uses the BALCO steroids case and reporting done by the San Francisco chronicle as a backdrop. Mr. Wasserman says that:
It's indeed a problem, which you might call The Dilemma of the Evil but Truthful Source: When a journalist receives solid information of clear public importance, which is given in order to advance a private stratagem that is both morally questionable and known to the reporter. The question is whether the journalist's professional obligation to report that information entitles him to ignore that unsavory private agenda.To his credit Mr. Wasserman states:
The short answer, I believe, is that it doesn't. Journalists aren't free to act as if that private agenda doesn't exist. They may well do the story anyway. But I think they must accept that they'll be complicit in that private stratagem, and must conclude that the wrongness of that complicity is redeemed by the wider public benefit of the secrets it unlocks.The problem as I see it is not so much the agenda that the source in this case (a lawyer that leaked secret grand jury testimony to try to obtain a dismissal for his client) had, as much as is the fact that the San Francisco Chronicle knowingly published false accusations, about the nature of the leaks, made by the leaker himself.
This can't be ethical under any circumstances.