In the paper, we investigate the physical layer security (PLS) of an unmanned aerial vehicle (UAV) enabled communication system that integrates non-orthogonal multiple access (NOMA) with cognitive radio (CR), namely CR-NOMA. Specifically, the secondary UAV transmits confidential information to multiple secondary legitimate receivers with NOMA by sharing the spectrum with the primary networks, while an eavesdropper (Eve) attempts to wiretap the communication. We aim to jointly optimize the three-dimensional (3D) UAV trajectory and power allocation to maximize the worst-case average secrecy sum rate of all secondary receivers (SRs) while keeping the interference to primal receivers (PRs) below a certain threshold. The formulated problem is mixed-binary non-convex and is generally NP-hard. To address this issue, we first equivalently transform the binary variables into continuous ones by introducing tractable inequality constraints. Then, we decompose the optimization problem into two subproblems and develop an efficient iterative algorithm based on the successive convex approximate (SCA) technique, block coordinate descent (BCD) technique, and penalty function method. Numerical results are extensively studied to show that the proposed joint design significantly outperforms the benchmark schemes in terms of secrecy rate. INDEX TERMS UAV communications, physical layer security, NOMA, cognitive radio, 3D trajectory design, power allocation.