Not sure what kind of bike you have, i have a chopper, so the need for something hugely secure wasn't too necessary for me...
I have secured my rack battery with 4x foam strips that i squeezed in between the rack and battery... holds perfect for what i need, but i'm not off-roading or anything...