@Jonius @aral Excellent summary available here: https://www.justsecurity.org/89489/expert-guidance-law-of-armed-conflict-in-the-israel-hamas-war/
“That principle [that both sides must comply with the law of armed conflict] holds regardless of which side attacked first, whether the initial attack complied with international law, which side is acting in lawful self-defense, and irrespective of the relative justice of the causes involved.”