Physical layer security (PLS) has been widely employed in studies of computation offloading under traditional centralized networks. Distinguished from existing studies of only combating passive eavesdropper, we propose an efficient user-centric secure two-stage (UCSTS) access point (AP) selection method to combat simultaneously active and passive eaves-dropping, which is exploiting the distributed feature of cell-free massive multiple-input-multiple-output (MIMO) scenarios. Furthermore, we propose a novel secure computation task offloading (SCTO) model to guarantee the security of both uplink and downlink transmission. Aiming at reducing total energy consumption with high security, a minimum energy consumption optimization problem is solved by alternative optimization (AO) algorithm. Simulation results show that the proposed model can well combat Eve while reducing the total energy consumption, and the security of the proposed selection method is better than the AN-based scheme.