Three key roles of the media are those of gatekeeper, scorekeeper, and watchdog.
Gatekeeper refers to the power and influence in placing and keeping a given issue in public view. An example would be choosing to headline a local story rather than a national one.
In the scorekeeper role, the given medium enhances the report with numerical data, such as updating election results with each candidate's number of votes.
The watchdog role refers to the media's responsibility to research or investigate an important issue of public interest or security. The classic example is Bob Woodward-Carl Bernstein's Watergate investigations of the Nixon presidency.
Security is one major consideration, as shown in Edward Snowden's leaks of classified information. Revealing military or civilian intelligence can endanger the operatives. Another is protecting the privacy of victims of or witnesses to a crime.
The ethical responsibility to protect informants may damage credibility if the news organization reveals its source. Conversely, publishing or airing unsubstantiated stories will reduce public confidence. An extreme example is invented or plagiarized stories that New York Times reporter Jayson Blair published as factual in the early 2000s. The recent proliferation of "fake" news has severely eroded public confidence.