Protecting a system from active attackers who try to exploit threats.
Usually what is good for safety is also good for security, so the distinction is not so relevant.