The possibility that extraterrestrial intelligences (ETIs) could be hostile to humanity has been raised as a reason to avoid even trying to contact ETIs. However, there is a distinct shortage of analytical discussion about the risks of an attack, perhaps because of an implicit premise that we cannot analyze the decision making of an alien civilization. This paper argues that we can draw some inferences from the history of the Cold War and nuclear deterrence in order to show that at least some attack scenarios are likely to be exaggerated. In particular, it would seem to be unlikely that the humanity would be attacked simply because it might, sometime in the future, present a threat to the ETI. Even if communication proves to be difficult, rational decision-makers should avoid unprovoked attacks, because their success would be very difficult to assure. In general, it seems believable that interstellar conflicts between civilizations would remain rare. The findings advise caution for proposed interstellar missions, however, as starfaring capability itself might be seen as a threat. On the other hand, attempting to contact ETIs seems to be a relatively low-risk strategy: paranoid ETIs must also consider the possibility that the messages are a deception designed to lure out hostile civilizations and preemptively destroy them.