Nowadays, reconfigurable intelligent surfaces (RISs) are broadly used due to their flexibility and cost-effectiveness in controlling the wireless environment with low-cost passive reflecting elements. In addition, RIS-assisted systems offer extremely power-efficient alternatives to conventional multi-antenna amplify-and-forward relaying systems. This paper presents an RIS-assisted secure wireless sensor network (WSN) that consists of multiple sensor nodes, an eavesdropper, a friendly jammer, and a sink node. The RIS helps to improve the direct link between the sensor nodes and the sink node. Meanwhile, the jammer and the RIS deteriorate the wiretap channel for the eavesdropper. More specifically, we aim to maximize the secrecy rate through the joint optimization of the RIS phase shifts, sensor scheduling strategy and jamming power. At first, the scheduling strategy is selected, and then the problem is solved using the block coordinate descent (BCD) method. Simulation results show the significant improvement in the secrecy performance achieved through the proposed RIS-assisted system.