This paper investigates the pilot assignment and power control problems for secure UAV communications in cell-free massive MIMO network with the user-centric scheme, where numerous distributed access points (APs) simultaneously serve multiple UAVs and terminal users. Meanwhile, there exists one UAV acting as an eavesdropper which can perform pilot spoofing attack. Considering a mixture of Rayleigh and Ricean fading channels, the APs respectively perform MMSE estimation and distributed conjugate beamforming for uplink training and downlink data transmission. Using random matrix theory, the closed-form expression for a tight lower bound on the achievable secrecy rate is derived, which enables the impact analysis of key parameters, such as power, antenna configuration, UAV height, etc. Taking into account both performance and complexity, a novel pilot assignment scheme is proposed by combining weighted graphic framework and genetic algorithm, which can actualize global search with limited iterations. The max-min power control with security constraints is then studied in parallel, which can not only enhance the network fairness but also ensure the security. Accordingly, successive convex approximation and fractional optimization are jointly utilized to solve this non-convex problem. Simulation results numerically verify the analytical results and indicate the superiority of the proposed pilot assignment and power control schemes.