I think at various times I have heard things said which I equated to those expressions but of course I cannot recall them.
Linguée gives many options and I have picked out what I think are the best (with posthumous thanks to Pachapapa for the site)
méfiez-vous de vos aspirations
s'est pris à son propre piège.
s'est tiré dans le pied
Méfiez-vous des porteurs de cadeaux
And for my one which again I did know but couldnt recall:
On récolte ce qu'on sème.
An amazing site I reckon you will agree as it is really meant for technical and business terms.