Rule 80. The use of booby-traps which are in any way attached to or associated with objects or persons entitled to special protection under international humanitarian law or with objects that are likely to attract civilians is prohibited.
https://ihl-databases.icrc.org/en/customary-ihl/v1/rule80