Risks of using device body as heat sink for IGBT and Bridge rectifier
Obviously there are two primary risks: shock and temperature.

For shock, any mains-connnected circuitry MUST be double-insulated. &mdash; in other words, there must be at least two independent layers of insulation, each of which is capable of withstanding the peak voltage on its own.

For temperature, you must make sure that no exposed surfaces ever get hot enough to cause burns, or worse yet, to ignite any flammable materials. If the heatsink gets too hot on its own, sometimes it makes sense to put a shroud around it and blow air across it with a fan.