Muslim scholars have not concealed these events: they are recorded openly in Sahih al-Bukhari, Sahih Muslim and the early biographies, and they are discussed in the books of law, but they are understood as wartime acts against enemies and not as killings for opinion.
- The killing of Ka'b ibn al-Ashraf and Abu Rafi' is in Sahih al-Bukhari, and the reports describe men who broke treaties, helped to raise armies against Madinah and insulted the Prophet (saw) and the Muslim women.
- The stories of Asma bint Marwan and Abu 'Afak come through chains that scholars have graded weak, and some, such as Ibn Taymiyya, accepted them while others rejected them.
- Banu Qaynuqa and Banu Nadir were exiled and not destroyed, and Banu Qurayzah were judged by their own ally Sa'd ibn Mu'adh (ra) after they betrayed the Muslims during the siege of Madinah.
- The Prophet (saw) also forgave many who had mocked him, and forbade the killing of women and children, so these events cannot be read as a policy of silencing critics.
Introduction
The question assumes that Muslims hide these events and asks whether it is because they are embarrassing, wrong, or did not occur. The assumption is not borne out by the sources. The events are in the earliest Muslim texts, were recorded by Muslim scholars, and are taught in Islamic courses on the biography of the Prophet (saw), known as sira. What varies is how scholars understand them, and how much confidence they place in each report. A fair answer therefore separates the well-attested events from those with weak chains, and sets the matter in the context of a state at war.
The sources are Sahih al-Bukhari and Sahih Muslim, which are the most reliable hadith collections, and the biographies of Ibn Ishaq (as edited by Ibn Hisham), Ibn Sa'd and al-Waqidi. The last of these is regarded by hadith critics as an unreliable narrator, which matters, since several of the reports about poets come through him. This answer sets these out and then looks at the legal discussion, including the discussion by scholars of whether killing for speech alone can be justified.
The Qur'an sets the frame for the treatment of treaty-breakers:
وَإِن نَّكَثُوا أَيْمَانَهُم مِّن بَعْدِ عَهْدِهِمْ وَطَعَنُوا فِي دِينِكُمْ فَقَاتِلُوا أَئِمَّةَ الْكُفْرِ
"If they break their oaths after their treaty and attack your religion, then fight the leaders of disbelief." (9:12)
Ka'b ibn al-Ashraf and Abu Rafi'
Ka'b ibn al-Ashraf was a poet from Banu Nadir with a Jewish mother and an Arab father. Sahih al-Bukhari and Sahih Muslim report that the Prophet (saw) said: who will deal with Ka'b ibn al-Ashraf, for he has harmed Allah and His Messenger, and Muhammad ibn Maslama (ra) volunteered. The fuller account in Ibn Ishaq says that after Badr, Ka'b travelled to Makkah, wept for the dead of Quraysh, urged them to take revenge and wrote verses of an insulting kind about Muslim women. The early scholars treated this as more than speech: he was a party to the Madinah charter, which bound the Jewish tribes to defend the city against attack, and he incited its enemies.
Abu Rafi' Sallam ibn Abi al-Huqayq, of Khaybar, is the subject of a report in Sahih al-Bukhari in which 'Abdullah ibn 'Atik (ra) and a group of the Ansar were sent against him. The sources say he had helped to gather the Confederates for the siege of Madinah in 5 AH and was funding hostile tribes. Ibn Hajar, in Fath al-Bari, comments on these hadith and notes that the Prophet (saw) instructed them not to kill women or children, which is also in the report.
Asma bint Marwan, Abu 'Afak and the weak reports
The accounts of Asma bint Marwan and Abu 'Afak appear in Ibn Sa'd and in Ibn Ishaq and later works such as that of al-Waqidi. They say that Asma, a woman of Banu Khatma, composed verses against the Muslims and was killed by 'Umayr ibn 'Adi, and that the aged Abu 'Afak was killed for similar verses. Hadith scholars have criticised the chains. Ibn Hajar says in al-Isaba and elsewhere that the narration of Asma is through weak narrators, and Ibn 'Adi and others judged the reports unsound. Some modern Muslim writers therefore deny the stories, or doubt them. Other scholars, such as Ibn Taymiyya in al-Sarim al-Maslul, used the report of the woman to argue that anyone who insults the Prophet (saw) while at war may be killed, though he also cited it with caution.
This is a real difference among Muslim scholars. One group, relying on the weak grading, holds that the events cannot be used as evidence. Another group accepts them as evidence of a rule against those who insult the Prophet (saw), and a third accepts them but reads them as wartime incitement. A historian outside the faith may notice that the same weakness in chains is often passed over in popular criticism.
The Jewish tribes of Madinah
The claim about tribes being 'terminated' needs care. Banu Qaynuqa were besieged after an incident in which a Muslim woman was exposed in the market and a Muslim man who defended her was killed, and they were exiled after the intercession of 'Abdullah ibn Ubayy. Banu Nadir were exiled in 4 AH after a plot against the Prophet (saw), which is the subject of Surat al-Hashr (59:2 to 4), and they were allowed to take their goods. The events are in Ibn Ishaq and are summarised in Sahih al-Bukhari's book of military expeditions.
Banu Qurayzah were a different case. During the siege of the Trench, the Qurayzah leader Ka'b ibn Asad was approached by Huyayy ibn Akhtab, and the tribe broke its agreement, which exposed the rear of Madinah. After the siege, they surrendered on the condition that Sa'd ibn Mu'adh (ra), their old ally from the Aws, would judge them. He ruled that the fighting men be killed and the others taken captive, a ruling in line with the Torah, and the Prophet (saw) is reported to have said: you have judged by the judgement of Allah (Sahih al-Bukhari and Sahih Muslim). The number of men killed is given as between about 400 and 900 in the sources, and the historian Walid Arafat argued in 1976 that the figures and the story may have been embellished. Muslim and non-Muslim historians differ on the details, and this is a point that scholars freely discuss.
Mercy, limits and the wider record
The Prophet (saw) forgave many who had insulted him. After the conquest of Makkah, he spared Ka'b ibn Zuhayr, a poet who had satirised him, when the poet came and recited his famous ode, according to Ibn Ishaq. He also refused to have 'Abdullah ibn Ubayy, who had slandered his household, put to death, saying that people would say that Muhammad kills his companions (Sahih al-Bukhari and Sahih Muslim). He forbade the killing of women and children on campaigns (Sahih al-Bukhari and Sahih Muslim).
Muslim jurists have since argued over how far these events set rules. The Hanafis in general held that a non-Muslim under a covenant who insults the Prophet (saw) is not put to death for that alone, whereas the Malikis and Hanbalis were stricter, as in Qadi 'Iyad's al-Shifa' and Ibn Taymiyya's al-Sarim al-Maslul. Contemporary scholars such as Taha Jabir al-Alwani and Jamal al-Banna have argued that the Qur'an prescribes no earthly punishment for speech alone, and the position is held by a minority, but it shows that Muslims openly argue the point.
Conclusion
These events are not concealed by Muslim scholars. They are in the earliest sources and are debated in the books of law. The better attested ones, the killings of Ka'b ibn al-Ashraf and Abu Rafi', were directed at men who broke covenants and helped enemy armies, and Banu Qurayzah were judged by their own ally after treason in wartime. The weaker accounts, such as those of Asma and Abu 'Afak, are disputed on the basis of their chains.
A fair reading sees a young state at war, and a Prophet (saw) who forgave far more than he punished. Whether any of the incidents is read as a model for the present is a question on which scholars differ, and most today reject private violence against speakers. Allah knows best.
References
Sahih al-Bukhari and Sahih Muslim, hadith on Ka'b ibn al-Ashraf, Abu Rafi', Sa'd ibn Mu'adh and 'Abdullah ibn Ubayy.
Ibn Hisham, al-Sira al-Nabawiyya (the recension of Ibn Ishaq); Ibn Sa'd, al-Tabaqat al-Kubra.
Ibn Hajar, Fath al-Bari and al-Isaba.
Ibn Taymiyya, al-Sarim al-Maslul; Qadi 'Iyad, al-Shifa'.
W. Arafat, 'New Light on the Story of Banu Qurayza and the Jews of Medina', Journal of the Royal Asiatic Society (1976).
Qur'an: 9:12, 59:2 to 4.