It’s already clear in the actual movie Holdo believed there was a spy, as no one in the Resistance believes that hyperspace tracking even exists.
That’s nowhere in the text of the movie. But I believe it would be easy to contextualise events so that it unequivocally reads as such, rather than one of many post-facto surmises.
It’s called an inference. It does not have to be spelled out to you.