How to predict and prevent future threats