On one hand, its easier for a spy to communicate with their handlers.

On the other hand, mass surveillance make it more difficult for the spy to hide their activities and thus make it easier for them to get caught.