## 1 Introduction  
Food safety is one of the main concerns of the food industry, in which there are still many issues to be resolved and challenges to face in order to detect and prevent possible food risks. In fact, food safety is part of one of the Sustainable Development Goals (SDGs) included in the 2030 Agenda, specifically SDG 2, which seeks to end hunger, achieve food safety, and improve nutrition, as well as promoting sustainable agriculture [1]. However, this SDG is also complemented with others that may be indirectly related to food issues, such as SDG 3 (ensure healthy lives and promote well-being for all at all ages) and SDG 12 (responsible consumption and production) [1]. In this sense, to ensure food safety, it is necessary to carry out an exhaustive control of the entire food supply chain, which covers all the steps of the food production and processing process, from the moment the food products are obtained until they reach the final consumer, because all the steps are decisive in the quality of the final product. Accordingly, the European Farm to Fork strategy seeksto make food systems fair, healthy and environmentally friendly based on the premise that the combination of new technologies and scientific discoveries with increasing public awareness and demand for sustainable food can benefit all stakeholders [2]. For this reason, in recent decades, food safety has evolved towards the demand for greater food control through the development of new production systems, technologies and eating habits. This has enabled the detection of new risks, different from classical contamination by microorganisms, which are caused by the occurrence of contaminating substances whose presence in food has gone unnoticed to date. Moreover, the fact that the health of consumers may be affected by food intake has led to a revision of food legislation, highlighting the need to redirect regulations towards a policy more focused on surveillance [3]. Currently, there are five types of organic contaminants legislated in Europe that are monitored in different food groups to ensure safe food products from \"farm to table\". These five types include: (1) contaminants from food processing, industrial activity, environmental pollution, mycotoxins and other natural toxins, (2) pesticide residues, (3) veterinary drug residues, (4) residues of compounds that act as growth promoters and (5) contaminants from packaging [4; 5]. Within the first group, some natural plant toxins have been considered in recent years as priority pollutants. Among them, pyrrolidine alkaloids (PAs), propane alkaloids (TAs) and opium alkaloids (OAs) have recently gained special interest due to their occurrence in many foods and feeds [6; 7; 8]. As a result, many food alerts have notified the presence of these alkaloids at concentration levels higher than the maximum levels established by the competent authorities in food, which could lead to the appearance of chronic diseases or acute intoxications [6; 7; 8; 9]. Accordingly, the foods more likely to be contaminated with these alkaloids are those of plant origin, such as cereals, seeds, herbs, spices, teas, herbal teas, honey, food supplements and their derived products. For instance, high levels of PAs, up to 133,870 \(\upmu\)g/kg, have been detected in oregano samples, while in the case of TAs, concentrations in the range 1200-1500 \(\upmu\)g/kg and 360-460 \(\upmu\)g/kg of atropine and scopolamine, respectively, have been noted in sorghum flours. Likewise, concerning levels of the OA morphine, ranging between 2.4 and 5.2 mg/kg, have been reported in frozen bread with poppy seeds [9]. For this reason, a legislation for these alkaloids has recently been established, which allows guaranteeing the monitoring and control of these contaminants in several foods [10; 11; 12].