There are many facets to running a vast Star Empire, from administration to military and everything in between. That leaves plenty of room for secret intelligence organizations to operate underneath, and for many years, the best example of that in Star Trek was the Romulan Tal Shiar.