http://en.wikipedia.org/wiki/Letting_the_cat_out_of_the_bag
Note that "letting the cat out of the bag" is used in cases where the truth comes out, not when someone is about to be punished. Consider the following two sentences.
After the jury returned a guilty verdict, the judge let the cat out of the bag that the defendant would serve fifteen years.
At the conference, the Microsoft employee let the cat out of the bag that that Windows 9 wouldn't run on x86.
I would argue that the second feels far more natural than the first. That's because it's about uncovering the truth, like the fact that the pig in your poke is really just a cat, and not about punishment, like pulling out the cat o' nine tails.