A man passed through the mosque carrying arrows, so the Messenger of Allah ﷺ said to him, "Hold them by their tips."The man replied, "Yes."
حدثنا هشام بن عمار حدثنا سفيان بن عيينة قال قلت لعمرو بن دينار أسمعت
مر رجل بسهام في المسجد فقال رسول الله ﷺ أمسك بنصالها قال نعم
Bukhari narrated it, chapter on Prayer, section titled "One should hold the arrowheads when passing," and Muslim, chapter on Righteousness and Maintaining Ties, section titled "The command for one who passes through a masjid or marketplace with a weapon..." etc., hadith no. 120/2614, from the hadith of Sufyan, with this chain.