"O you who have believed, do not betray Allah and the Messenger or betray your trusts while you know [the consequence]" (8:27).
Al-Suddi said:
It was revealed concerning a man among the companions of the Prophet who signaled to the Banu Qurayza with his hand, [meaning] that they should not descend to the judgment. It was [considered] an act of betrayal on his part and a sin, "while you know" that it is a betrayal.