got your hand caught in the cookie jar

To get your hand caught in the cookie jar means to be caught doing something wrong; the phrase originates from children who are caught by their parents taking a cookie when they didnt first ask for permission. Getting your hand caught in the cookie jar can be referring to any type of wrong doing that you were caught in the act, not necessarily stealing something; it can be for any type of act you did without permission.