I see all over youtube and survival blogs of people cooking out of the can, I even mentioned here in the past not a good idea. Yes cans on the super markets shelve are far safer than in the past, providing you don't cook the food in the can.
Scott McCarty of Colorado-based Ball Corporation, a leading U.S. food and beverage packaging maker
Proponents of can-cooking cite the fact that many canned goods are already heated up in their cans to kill bacteria during the canning process, so what harm could a little more heating do? McCarty concedes that some cans are indeed heated during the packing process. “But that isn't all cans or all foods, and it is a carefully controlled and monitored process done in an environment that is made to do it.”
As for what metals may be leaching into your canned food, it depends. In the U.S., most food cans are made of steel. Chromium and nickel can find their way out of steel, but the amounts would be miniscule to nil.
The insides of most cans on grocery shelves today are coated with food-grade epoxy. But these liners have been shown to contain Bisphenol-A (BPA) and other potentially harmful chemicals.
Ball Corporation, back in 1999 to switch out traditional epoxy-based liners with a baked-on, BPA-free enamel lining derived from plant oils and resins. Not all can from manufactures are BPA free, looking at the can on the store shelves you're not going to know who made the can