In March, Gizmodo reported that Google had formalized a partnership with the U.S. Department of Defense to improve image recognition capabilities for drones.

The news prompted an immediate ― and predictably negative ― response. Despite Google’s attempt to message the contract as serving “non-offensive uses only,” news outlets were quick to explore the ethical implications of this partnership and question how the technology could be extended to weaponry.

Google’s leadership anticipated this external response. What they didn’t plan for was the degree of internal backlash they’d receive. Following the announcement of the partnership, Google employees began complaining about working for “the business of war.” Some workers left in protest. In April, about 4,000 Google employees signed a letter to the CEO requesting the cancellation of the project.

On June 1, Google announced that it won’t be renewing its contract with the DoD when it expires. Accompanying that announcement was the news that Google will be updating its code of ethics.

The Google-DoD saga should serve as a cautionary tale about the drawbacks for tech companies of pursuing high-value ― but also highly visible ― government contracts. At the same time, there’s deep interest within tech ― and not just “Big Tech” ― to land such contracts. Right now, tech giants including Amazon, Oracle, Microsoft and, yes, Google are vying for a two-year DoD contract to build a military cloud system.

For tech companies, government contracts promise big money and relative security. But they are also a slippery slope, as the Google fiasco illustrated. How can tech companies pursue government contracts without going down the same path?

  • Assess all projects against your core values: The degree of internal backlash to Google’s DoD contract indicates that company leadership didn’t take the time to seriously consider how the contract collided with business values. In their protest letter, employees explicitly pointed this out: “This contract puts Google’s reputation at risk and stands in direct opposition to our core values.” The specific value they cited was the imperative to never jeopardize user trust. Other tech companies considering such contracts should ask themselves if perceived hypocrisy is a price worth paying.
  • Be more transparent ― internally and externally: Companies should realize that everybody ― employees and the general public alike ― recognizes and rejects corporate speak. When Google emphasized the “non-offensive” nature of its DoD partnership, it didn’t fool anyone. The company’s calculated myopia only made things worse. Other tech companies shouldn’t make the same mistake. Instead, they should prioritize top-down transparency, especially internally during the decision-making process.
  • Know when to say “no”: When companies better assess government contracts against core values and more transparently communicate their thinking throughout the decision-making process, they’ll be in a much better position to make informed determinations about whether or not to move forward with a contract. Then comes the hard part: actually saying “no.” Google missed an opportunity to say “no,” with clear consequences.

Tech and government are intertwined. They will only become more closely connected moving forward. And high-value government contracts will continue to emerge as this symbiosis deepens.

But as tech companies fight to land bigger contracts, they should take a moment to consider the implications of doing so. There is a way to pursue government contracts and still preserve company values, but that requires foresight, discernment and, above all, transparency.

Patric Palm is the CEO and co-founder of Favro, a collaboration and project management application.