وَإِن يُرِيدُواْ خِيَانَتَكَ فَقَدۡ خَانُواْ ٱللَّهَ مِن قَبۡلُ فَأَمۡكَنَ مِنۡهُمۡۗ وَٱللَّهُ عَلِيمٌ حَكِيمٌ
But if they seek to betray you, then they have already betrayed Allah earlier, and He gave [you] power over them; and Allah is all-knowing, all-wise.
Agha Ali Puya Commentary
Commentary on Quran 8:71
[Pooya/Ali Commentary 8:71] Even if the pardoned prisoners of war carry out treacherous plans after their release Allah promises to give the believers power over them, but "killing of captives" has not been approved.