Riina just did the dirty job, orders came from secret services,politicians etc.
I agree, the so-called "excellent" murders like Falcone and Borsellino or Rocco Chinnici were certainly ordered by somebody from the state. However, Riina also did a big bloodbath on his own, he wiped out the whole "old mafia" which were hundreds of deaths, if not more, imo it's unlikely that the mafia war was overseen by the state because the former bosses had a better relationship with the government than Riina had, the destruction of the old mafia gave problems to them as well.
However, I agree that later on they certainly tried to exploit Riina as well to get rid of honest magistrates like Falcone, Borsellino, Chinnici etc