Protocol I
Source:
Wikipedia
Protocol I is a 1977 amendment protocol to the Geneva Conventions relating to the protection of victims of international conflicts, where "armed conflicts in which peoples are fighting against colonial domination, alien occupation or racist regimes" are to be considered international conflicts.[1] It reaffirms the international laws of the original Geneva Conventions of 1949, but adds clarifications and new provisions to accommodate developments in modern international warfare that have taken place since the Second World War.
---
Articles 51 and 54 outlaw indiscriminate attacks on civilian populations, and destruction of food, water, and other materials needed for survival. Indiscriminate attacks include directly attacking civilian (non-military) targets, but also using technology such as biological weapons, nuclear weapons and land mines, whose scope of destruction cannot be limited.[6] A total war that does not distinguish between civilian and military targets is considered a war crime.
Read more:
https://en.wikipedia.org/wiki/Protocol_I
Customary IHL
Source:
International Committee of the Red Cross
Rule 6. Civilians Loss of Protection from Attack
Rule 6. Civilians are protected against attack, unless and for such time as they take a direct part in hostilities.
Summary
State practice establishes this rule as a norm of customary international law applicable in both international and non-international armed conflicts. The use of human shields is the subject of Rule 97.
International armed conflicts
The rule whereby civilians lose their protection against attack when and for such time as they take a direct part in hostilities is contained in Article 51(3) of Additional Protocol I, to which no reservations have been made.
Read more:
https://www.icrc.org/customary-ihl/eng/docs/v1_rul_rule6#Fn_45_1
INTERPRETIVE guidance on the notion of Direct participation in hostilities under international humanitarian law
Source:
ICRC, 2009
https://www.icrc.org/eng/assets/files/other/icrc-002-0990.pdf