The Prophet ﷺ said, "When any of you passes through our mosque or our marketplace carrying arrows, let him hold them by their tips," or he said, "let him grasp them with his hand," or he said, "let him hold them firmly in his palm, so that he does not injure any of the Muslims."
حدثنا محمد بن العلاء حدثنا أبو أسامة عن بريد عن أبي بردة
عن النبي ﷺ قال إذا مر أحدكم في مسجدنا أو في سوقنا ومعه نبل فليمسك على نصالها أو قال فليقبض كفه أو قال فليقبض بكفه أن تصيب أحدا من المسلمين
Bukhari reported it in "The Book of Tribulations," chapter on the saying of the Prophet ﷺ, "Whoever bears arms against us is not one of us," hadith no. 7075, and Muslim in "The Book of Righteousness and Kinship," chapter on the command to whoever passes through a masjid or marketplace carrying weapons... etc., hadith no. 2615, from Abu Kurayb Muhammad bin Ala, with this chain.