Мелахим А 2:8 Галаха: Mishneh Torah, Kings and Wars

וְהִנֵּ֣ה עִ֠מְּךָ שִֽׁמְעִ֨י בֶן־גֵּרָ֥א בֶן־הַיְמִינִי֮ מִבַּחֻרִים֒ וְה֤וּא קִֽלְלַ֙נִי֙ קְלָלָ֣ה נִמְרֶ֔צֶת בְּי֖וֹם לֶכְתִּ֣י מַחֲנָ֑יִם וְהֽוּא־יָרַ֤ד לִקְרָאתִי֙ הַיַּרְדֵּ֔ן וָאֶשָּׁ֨בַֽע ל֤וֹ בַֽיהוָה֙ לֵאמֹ֔ר אִם־אֲמִֽיתְךָ֖ בֶּחָֽרֶב׃

И вот, есть с тобою Симей, сын Геры, Вениамитянин из Бахурима, который проклял меня жестоким проклятием в тот день, когда я пошел в Маханаим; но он пришел встретить меня на Иордане, и я поклялся ему Господом, говоря: не убью тебя мечом.

Mishneh Torah, Kings and Wars

The king has the right to execute anyone who rebels against a king. One is liable to the death penalty even if the king decreed that he is to go to a particular place and he did not go there or that he not leave his house and left. If he so wishes, he may execute him it says, “any man who disagrees with your words” (Joshua 1:18). Similarly, the king has permission to execute anyone who disgraces24Or, embarrasses. him or insults him, as was the case with Shimi ben Gera. The king has permission to execute only by the sword. He may imprison and beat someone with a whip for the sake of his honor. However, he may not declare their money ownerless, for it would be robbery were he to do so.