You're on thin ice.

You're on thin ice.
When someone says 'You're on thin ice,' they are warning that continuing current behavior could lead to trouble or danger. Think of someone skating on a lake where the ice is visibly thinning. Each movement must be calculated and cautious; one wrong step and they might fall through. In everyday life, this idiom could be used by a boss who warns an employee that their performance is unsatisfactory, implying that they’re close to facing serious consequences, such as losing their job, if improvements aren't made.
Be careful; you're on thin ice.
Be cautious because you are in a risky situation.
After breaking the rules, he knew he was on thin ice.
He realized he was in a precarious position after breaking the rules.
Don't push your luck; you're already on thin ice with the boss.
Don't push your limits; you are already in a risky situation with the boss.