1 Kings 2:43

Why then hast thou not kept the oath of the Lord, and the commandment that I have charged thee with?

Cross-reference

Ecclesiastes 8:2 directly states the principle: keep the king's command because of your oath to God — exactly Shimei's failure.

In Ezekiel 17:18, the king of Judah breaks his oath to Babylon, mirroring Shimei's failure to keep his sworn pledge.

Ezekiel 17:19 declares God will bring the broken oath back on the oath-breaker's head, reinforcing the principle of retribution.