This letter aims to provide sensing capabilities for a potential eavesdropper, while simultaneously enabling the secure communications with the legitimate users in a cell-free multipleinput multiple-output system with limited fronthaul links. In order to maximize the sensing performance, the joint design of fronthaul compression and beamforming is proposed considering the constraints on the finite fronthaul-capacity links and the maximum power along with the worst-case secrecy rate requirements. To this end, we propose an algorithmic solution based on the minorization-maximization method and semidefinite programming relaxation techniques, whose performance superiority is verified via simulations compared to the reference schemes such as distributed sensing and random beamforming.