We present a representative development in the science of security that includes a generic model of computer systems, their security properties and adversaries who actively interfere with such systems. We describe logic-based methods to reason about security properties of a system as a composition of properties of its components, and several successful applications of the method in explaining and predicting attacks in a wide-variety of systems. Keywords. Adversary models; compositional security; logic-based security; rely-guarantee reasoning