In this paper, we study a secure integrated sensing and communication (ISAC) system where one multi-antenna base station (BS) simultaneously communicates with one single-antenna user and senses the location parameter of a target which serves as a potential eavesdropper via its reflected echo signals. In particular, we consider a challenging scenario where the target's location is unknown and random, while its distribution information is known a priori. First, we derive the posterior Cram\'er-Rao bound (PCRB) of the mean-squared error (MSE) in target location sensing, which has a complicated expression. To draw more insights, we derive a tight approximation of it in closed form, which indicates that the transmit beamforming should achieve a "probability-dependent power focusing" effect over possible target locations, with more power focused on highly-probable locations. Next, considering an artificial noise based beamforming structure, we formulate the transmit beamforming optimization problem to maximize the worst-case secrecy rate among all possible target (eavesdropper) locations, subject to a threshold on the sensing PCRB. The formulated problem is non-convex and difficult to solve. We show that the problem can be solved via a two-stage method, by first obtaining the optimal beamforming corresponding to any given threshold on the signal-to-interference-plus-noise ratio (SINR) at the eavesdropper, and then obtaining the optimal threshold via one-dimensional search. By applying the semi-definite relaxation (SDR) technique, we relax the first problem into a convex form and further prove that the relaxation is tight, based on which the optimal solution of the original beamforming optimization problem can be obtained with polynomial-time complexity. Then, we further propose two suboptimal solutions with lower complexity. Numerical results validate the effectiveness of our designs.