If the enemy always knows what the heroes are up to, there are several possible explanations. There could indeed be a traitor. Or perhaps there's a spy who the heroes don't notice. Or bugging and tracking devices. Or maybe the heroes simply aren't covering their tracks and keeping their plans as secret as they think they are.* Or maybe the villain has access to powerful spy satellites and ubiquitous eavesdropping and surveillance systems. Or potentially even magical or supernatural powers.
The cool thing is you don't even need to decide this in advance. Just have the villain always be one step ahead for no readily apparent reason, and watch the players come up with possible reasons. Then pick the coolest one to be true!
* Hint: Don't use Facebook to plan your assault on the evil megacorporation's black ops data centre.
C-3PO: Well, this is a fine state of affairs.
Leia: You're telling me. We're locked in a cell, my dad's a total psycho. Who knows what he's gonna do?
Leia: And the Rebellion is screwed.
Leia: Somebody sold us out. Again. 3PO got shot.
C-3PO: No, I didn't!
Leia: The Empire knew we were coming here. There's clearly a traitor, and it's someone high up in the Rebellion.
C-3PO: Well it's not Han.
Chewbacca: It's not 3PO. And R2 and Luke didn't know we were coming here.
Han: And I'd know if it was Chewie.
Leia: So who does that leave?