It's true that booby traps are not allowed by the Geneva convention but that convention only applies to conduct in a war. I'm curious what law applies in the US.
The laws vary by state, some allow you to use traps as long as they don't cause serious harm, while others don't let you use them at all. No state allows you to set a lethal booby trap.
Here is the California law about them: https://law.justia.com/codes/california/2005/pen/12355.html