The proposed thesis explores the concept of risk assessment in vehicles implementing ADAS and autonomous driving systems, considering the hazard that are not only coming from failure scenario but are also related to potential misbehaviors of the functions that are implementing the decision-making system of the vehicles. Such analysis shall consider the entire chain, from data acquisition performed by sensors to the core of the vehicle intelligent system.