Another version, "When an enemy appears friendly, watch out" or better known as, "Beware of Greeks bearing gifts."
The Latin advice was recorded by Virgil, in his Aeneid, and is addressed to the men of Troy. The Trojans were told by one of their priests to mistrust the huge wooden horse left behind by the departing soldiers of Greece, supposedly as an offering to the gods to secure safe passage for Ulysses during his return to Greece.
Ignoring the advice, the Trojans didn't examine the horse-structure, but dragged it into their city. Unknown to the Trojan citizens, the horse contained a contingent of Greek soldiers who were able to open the city gates so many other Greek troops were able to destroy Troy. To this day, "a Trojan horse" is a thing or person that subverts from within an organization or group.
Even in computer science, the term "Trojan horse" is used to refer to a set of instructions hidden inside a legitimate program, causing a computer to perform illegitimate or destructive functions.