The introduction of highly automated technologies in socio-technical systems (STS) gives rise to new legal questions, especially as concerns liability for accidents, calling for new models of allocating decision-making tasks between humans and machines. We first discuss the relation between responsibility for the execution of a task and legal liability. Then we analyse the impact of automation in the allocation of liability within STS. In this regard, we present an actor-based analysis of liability allocation, taking account of the main types of liability, and in particular liability for software failures. In the final section of the chapter, we present the Legal Case, a methodology by which to analyse liability allocation in automated STSs and to assess the resulting legal risk for all actors involved.