I take you could go literal as in "to put your hand in the fire for somebody" but maybe more commonly, "
to stick one's neck out for somebody", with the idea that you "take responsibility" for whatever the person may do, as you trust that person.
"Poner la mano en el fuego por algo" would be "to put your finger on something" (as in being sure of it.)
Another ways would be something like,
To bet one's life on, to stake one's life on...