Although, as Cletus mentions, Starfleet is largely free of corruption, there is Section 31, a splinter organisation that 'protects' the Federation from its enemies through espionage, sabotage, manipulating foreign politics and even genocidal war tactics.