Dynamic security modeling in risk management using environmental knowledge