The evolution of IoT technology is opening new avenues for value creation in many domains. The automotive industry is impacted on by several additional trends. One of those is autonomous driving (AD), which needs to be propped up by integration of Internet of Things (IoT) and Cyber-Physical Systems (CPS) to improve user acceptance. Strong reliance of proposed solutions on communication and data management, as well as on a variety of complex and heterogeneous architectures and components exposes a range of vulnerabilities. The weaknesses are strongly correlated to dependability, which is crucial factor for success of AD. IoT4CPS, a flagship Austrian project, contributes to improvements in required dependability. It is developing guidelines, methods and tools for safe and secure integration of IoT into AD and corresponding smart production. The project addresses safety and security aspects of AD in a holistic manner. Some of the resulting considerations are described in this paper, alongside possible solutions based on virtualisation through usage of digital twins.