The reconfigurable intelligent surface (RIS) is widely recognized as an effective solution for enhancing security in wireless communications, owing to its passive reflective components and the ability to adjust signal phases. In light of this, this study investigates the physical layer security issues for a dual-hop RIS-aided system that makes use of both radio frequency (RF) and free space optical (FSO) connections, while taking into account three different eavesdropping scenarios: i) RF eavesdropping, ii) FSO eavesdropping, and iii) simultaneous RF and FSO eavesdropping. While Nakagami-m distributed fading affects the RF link, Málaga turbulence with pointing error affects the FSO link. The main goal of this research is to guarantee the confidentiality of information, preventing unauthorized access or disclosure. To this end, closed-form expressions are developed for the average secrecy capacity, secrecy outage probability, probability of strictly positive secrecy capacity, and effective secrecy throughput. Monte Carlo simulations are used to verify the precision of these expressions. To further explore the suggested model, the asymptotic formulations of various performance metrics are produced. The impact of different factors, such as fading severity, atmospheric conditions, and detection techniques, on the secrecy performance is analyzed through simulations. Numerical results highlight the significant role of the proposed model in ensuring the security of confidential information and emphasize the substantial impact of key factors on its secrecy performance.INDEX TERMS Reconfigurable intelligent surface, dual-hop system, effective secrecy throughput, secrecy outage probability.