The forthcoming sixth-generation (6G) communications standard is anticipated to provide integrated sensing and communication (ISAC) as a fundamental service. These ISAC systems present unique security challenges because of the exposure of information-bearing signals to sensing targets, enabling them to potentially eavesdrop on sensitive communication information with the assistance of sophisticated receivers. Recently, reconfigurable intelligent surfaces (RISs) have shown promising results in enhancing the physical layer security of various wireless communication systems, including ISAC. However, the performance of conventional passive RIS (pRIS)-enabled systems are often limited due to multiplicative fading, which can be alleviated using active RIS (aIRS). In this paper, we consider the problem of beampattern gain maximization in a secure pRIS/aRIS-enabled ISAC system, subject to signal-to-interference-plus-noise ratio constraints at communication receivers, and information leakage constraints at an eavesdropping target. For the challenging non-convex problem of joint beamforming design at the base station and the pRIS/aRIS, we propose a novel successive convex approximation (SCA)-based method. Unlike the conventional alternating optimization (AO)-based methods, in the proposed SCA-based approach, all of the optimization variables are updated simultaneously in each iteration. The proposed method shows significant performance superiority for pRIS-aided ISAC system compared to a benchmark scheme using penalty-based AO method. Moreover, our simulation results also confirm that aRIS-aided system has a notably higher beampattern gain at the target compared to that offered by the pRIS-aided system for the same power budget. We also present a detailed complexity analysis and proof of convergence for the proposed SCA-based method.