Killing of Incapacitated Terrorists
כָּל הַיָּכוֹל לְהַצִּיל בְּאֵיבָר מֵאֵיבָרָיו וְלֹא טָרַח בְּכָךְ אֶלָּא הִצִּיל בְּנַפְשׁוֹ שֶׁל רוֹדֵף וַהֲרָגוֹ הֲרֵי זֶה שׁוֹפֵךְ דָּמִים וְחַיָּב מִיתָה אֲבָל אֵין בֵּית דִּין מְמִיתִין אוֹתוֹ:

If one is able to save the victim at the cost of only a limb of the pursuer and does not take the trouble to do so but saves the victim at the cost of the pursuer's life, he is deemed a shedder of blood, and he deserves to be put to death. He may not, however, be put to death by the court.

אֵין כּוֹרְתִין בְּרִית לְשׁבְעָה עֲמָמִין כְּדֵי שֶׁנַּעֲשֶׂה עִמָּהֶן שָׁלוֹם וְנָנִיחַ אוֹתָם לַעֲבֹד עֲבוֹדָה זָרָה שֶׁנֶּאֱמַר (דברים ז ב) "לֹא תִכְרֹת לָהֶם בְּרִית" אֶלָּא יַחְזְרוּ מֵעֲבוֹדָתָם אוֹ יֵהָרְגוּ. וְאָסוּר לְרַחֵם עֲלֵיהֶם שֶׁנֶּאֱמַר (דברים ז ב) "וְלֹא תְחָנֵּם". לְפִיכָךְ אִם רָאָה מֵהֶם אוֹבֵד אוֹ טוֹבֵעַ בַּנָּהָר לֹא יַעֲלֶנּוּ. רָאָהוּ נָטוּי לָמוּת לֹא יַצִּילֶנּוּ. אֲבָל לְאַבְּדוֹ בְּיָדוֹ אוֹ לְדָחֳפוֹ לַבּוֹר וְכַיּוֹצֵא בָּזֶה אָסוּר מִפְּנֵי שֶׁאֵינוֹ עוֹשֶׂה עִמָּנוּ מִלְחָמָה.

It is forbidden to make a covenant of peace with the seven Canaanite nations, such peace as would permit them to continue the worship of idolatry, even as it is said: "Thou shalt not make any covenant with them" (Deut. 7.2). They shall either repent themselves of their worship, or be slain. It is moreover, forbidden to have mercy upon them, as it is said: "Nor show mercy unto them" (Ibid.). Therefore, if one saw one of them lost or drowning, he should not bring him up; if he sees him dying, he should not save him; but to destroy wantonly or to push him into a pit, or the like is forbidden, because he is not at war with us right now

וּבֶן נֹחַ נֶהֱרָג בְּעֵד אֶחָד וּבְדַיָּן אֶחָד בְּלֹא הַתְרָאָה וְעַל פִּי קְרוֹבִין.

A non-Jew is executed by the testimony of one, and with one judge, without forewarning, and by the testimony of relatives, but not by the testimony of a woman

תוספות עבודה זרה דף סד:

איזהו גר תושב כו'. במסקנא קאמר דהיינו להחיותו וא"ת והלא מיד שעבר שבע מצות חייב מיתה דאזהרת בני נח היא מיתתן בלא עדים והתראה י"ל דכל זמן שלא דנוהו בית דין אינו חייב מיתה תדע דהא אמרינן העובדי כוכבים לא מעלין ולא מורידין:

Tosfos ask why a Ben Noach isn't immediately put to death? Once a non-Jew transgresses one of the seven laws of the Bnei Noach, they can be killed! Tosfos answers that a Ben Noach needs to be condemned to death by a Beis Din (which implies a Jewish court?) before they can be put to death. Nevertheless, we typically follow the rule of Lo Ma'alin Vilo Moridin for non Jews (and this is before they were judged by Beis Din).

א"ר חנינא עובד כוכבים שהכה את ישראל חייב מיתה שנאמר (שמות ב, יב) ויפן כה וכה וירא כי אין איש [ויך את המצרי] וגו'
Rabbi Ḥanina says: A gentile who struck a Jew is liable to receive the death penalty, as it is stated when Moses saw an Egyptian striking a Hebrew: “And he turned this way and that way, and when he saw that there was no man, he struck the Egyptian and hid him in the sand” (Exodus 2:12).
ורבנן התם מי חלה שבועה עילוייהו כלל כיון דאמרו להו מארץ רחוקה באנו ולא באו לא חיילה שבועה עילוייהו כלל והאי דלא קטלינהו משום קדושת השם
And the Rabbis, who hold that such a vow can also be dissolved, respond to this claim in the following manner: There, did the oath take effect with regard to them at all? Since the people of Gibeon said to them: “We came from a far country” (Joshua 9:6), and they did not come from a far country, the oath did not take effect with regard to the Jewish people at all, as it was taken under false pretenses. And this, that the Jewish people did not kill the Gibeonites, like they did to the other nations who resided in the land of Canaan, despite the fact that the vow did not take effect, was due to the sanctity of God’s name. If they would have killed them, they would have desecrated God’s name by not fulfilling their word, although this vow did not take effect.