A Secure-by-Design Framework for Automotive On-board Network Risk Analysis