Since it started Google's unofficial motto has long been the simple phrase "don't be evil" and this has been despite carrying out some actions which many consider as moving to the dark side. However, now the code of conduct that Google distributes to its employees has deleted the phrase. According to the Wayback Machine the phrase was removed sometime in late April or early May so Google has officially had the option to be evil since then.
It looks like all that changed when Google was reorganised under a new parent company, Alphabet, in 2015, Alphabet assumed a slightly adjusted version of the motto, "do the right thing". This enable Alphabet staff to do evil acts if it was the right thing. The get out clause being that the rules did not say if the "right thing" was for Google or someone else
However the Google company retained its original "don't be evil" language as it had been deeply incorporated into Google's company culture -- so much so that a version of the phrase has served as the wifi password on the shuttles that Google uses to ferry its employees to its Mountain View headquarters.
According to Gizmodo the phrase is now gone, leaving Google free to build weapons for the military and dodge taxes like the rest of corporate America.