Many Americans are outraged at the government for mining user data from Apple, Google, Facebook and other Silicon Valley giants. What about the actions of the companies themselves -- have they met their ethical obligations to their customers and society as a whole? Do they even have any?

The Washington Post reported that the National Security Agency collects data "directly from the servers" of Microsoft, Yahoo, Google, Facebook, PalTalk, AOL, Skype, YouTube and Apple. While some companies issued carefully worded denials of involvement, it's hard to imagine they were unaware of the arrangement, however they choose to describe it.

Assuming that the companies found the program an infringement on our liberties, could they have declined to provide the government the information it requested? Ultimately, probably not; it seems unlikely they would have met the requests had they not faced a legal obligation to comply. But legal and ethical obligations aren't necessarily the same thing.

Take the recent case of Apple's use of Irish subsidiaries with no tax residency to avoid U.S. taxes; the tactics may be legally sound, but ethically dubious. Now turn that around: If companies are willing to go to such lengths to get around U.S. tax law, is it too much to ask that they apply the same creativity to avoiding the surrender of their customers' private information?

In Apple's case, that may have happened. Apple looks to have resisted the government's requests for years. What does that say about other companies, which complied more quickly: Are they better corporate citizens, or worse?

The role and obligation of the corporation in American society is an unsettled question. When Mitt Romney proclaimed that "corporations are people" in 2011, he sparked a combination of ridicule and outrage. But Apple, Facebook and Google occupy an increasing space in popular culture, and they're judged not only for the products they sell or the profits they generate, but also the way they treat their workers, pay their taxes and even design their headquarters.

The surveillance debate raises the question of whether our expectations of these companies and their leaders should also extend to the defense of our civil rights. Imagine, for an instant, that Steve Jobs, Sergey Brin, Larry Page and Mark Zuckerberg had held a press conference in 2007, when the government first began seeking this access, and said to the public, "The government has asked for your information, and we don't think that's right."

Faced with that kind of corporate civil disobedience, what would the government have done? Arrested them? Closed down their operations? Taken the companies over? It seems unlikely. More likely, the government would have backed down, at least temporarily. And the next time Congress tried to co-opt the nation's most prominent companies in its intelligence gathering, it might have thought twice.

The point isn't that these companies should have stopped this program from starting. It is that they probably had the power to do so, when so few others had that power. The line about great power and great responsibility is apt: Does the ethical burden increase with the consequences of a company's decisions?

This week's revelations demonstrate the centrality of Silicon Valley to American life, in ways we never imagined. In the face of that expanded role, maybe it's time to revisit what it means for a company to be a good corporate citizen, and whether that includes acting as a check on the government when no one else can.

(Christopher Flavelle is a member of the Bloomberg View editorial board. Follow him on Twitter.)