You're on / skating on thin ice.
on thin ice In a precarious or risky position, as in After failing the midterm, he was on thin ice with his math teacher. This metaphor is often rounded out as skate on thin ice, as in He knew he was skating on thin ice when he took his rent money with him to the racetrack. This idiom, which alludes to the danger that treading on thin ice will cause it to break, was first used figuratively by Ralph Waldo Emerson in his essay Prudence (1841): "In skating over thin ice our safety is in our speed." Christine Ammer; The American Heritage Dictionary of Idioms (2013)
If you say that someone is on thin ice or is skating on thin ice, you mean that they are doing something risky that may have serious or unpleasant consequences. Collins
be skating on thin ice
Engaged in some activity or behavior that is very risky, dangerous, or likely to cause a lot of trouble. In a precarious or risky situation. Farlex Dictionary of Idioms