Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:8:27

O you who have believed, do not betray Allah and the Messenger or betray your trusts while you know ˹the consequence˺.  

The following was revealed regarding Abū Lubāba Marwān b. ‘Abd al-Mundhir: the Prophet (s) had dispatched him to the Banū Qurayza so that they would submit to his ˹the Prophet’s˺ authority. But they ˹Banū Qurayza˺ consulted with him ˹as to whether they should cede˺, and he pointed out to them that a slaughter would ensue — for members of his family and his property were among them: O you who believe, do not betray God and the Messenger, and, do not, betray your trusts, that which has been entrusted to you, in the way of religion or otherwise, while you are aware.
القرآن:٨:٢٧

يَا أَيُّهَا الَّذِينَ آمَنُوا لَا تَخُونُوا اللَّهَ وَالرَّسُولَ وَتَخُونُوا أَمَانَاتِكُمْ وَأَنْتُمْ تَعْلَمُونَ  

ونزل في أبي لبابة مروان بن عبد المنذر وقد بعثه رسول الله ﷺ إلى قريظة لينزلوا على حكمه فاستشاروه فأشار إليهم أنه الذبح لأن عياله وماله فيهم {يا أيها الذين آمنوا لا تخونوا الله والرسول و تخونوا أماناتكم} ما ائتمنتم عليه من الدين وغيره {وأنتم تعلمون}.