I definitely have read a comic which explained this (although i'm pretty sure it wouldn't be canon anymore). I thought it was in the Clone Wars volumes of Star Wars: Republic but I looked up the summaries and I might be wrong - maybe it was in one of the Legends? anyways.
Somehow the idea that there is a Sith in the senate is presented to the Jedi council, and somehow Anakin finds out. He and his master (I believe it was Ki-adi mundi at the time, as Obi-Wan was being held captive by Ventress?) run the idea by Palpatine, because Palpatine and Anakin have some sort of closeness, who suggests that testing all senators for midi-chlorians would have grave political consequences (which makes sense from the Jedi's perspective).
IIRC, either Palpatine organizes it so that the Jedi who was championing the cause was sent on a mission where the military intelligence underestimated the droid forces by an order of magnitude and died, or he arranged for a transport vehicle for the senator championing the idea to explode leaving Coruscant as Mon Mothma and Bail Organa watch horrified, and then something else comes up that takes the attention of the Council.
This is a bit vague cause it's been years since I read these, but this was the canon explanation pre-legends.