have (one's) hand in the cookie jar
To be in the act or attempt of some wrongdoing, especially one involving bribery or the illicit exploitation of one's position of power or authority. The senator was long accused of having his hand in the cookie jar, and he was finally caught when his conversation with a Wall Street executive about insider trading was leaked to the media. The new tax legislation is an attempt to close the loopholes that have allowed companies that had their hands in the cookie jar to go unpunished for so many years.