The government will underwrite a £1.5bn loan guarantee to Jaguar Land Rover (JLR) after a mass cyber attack forced a shutdown.