Someone is skating on thin ice

they are doing something (or are in a situation that is) risky, dangerous or that may cause trouble

e.g. my cousin has invested all his savings into bitcoins. I’ve warned him how risky that is but he wouldn’t listen; he’s skating on thin ice.

The idiom comes from The Netherlands, where skating appears to have been invented.
The idiom was commonly used especially when rivers or streams froze during winter and people skated over them. If the ice is thin, it may break and the skater may fall into the freezing water, risking hypothermia even death.