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:12:19

And there came a company of travelers; then they sent their water drawer, and he let down his bucket. He said, "Good news! Here is a boy." And they concealed him, ˹taking him˺ as merchandise; and Allah was knowing of what they did.  

And there came a caravan — travellers going from Midian to Egypt, who stopped near to Joseph’s well — and they sent their water-drawer, the one who goes down to the water ˹source˺ to draw from it, and he let down his bucket, into the well and Joseph clung to it and he pulled him out, and when he saw him: he said, ‘Good news!’ (a variant reading ˹of yā bushrā˺ has yā bushrāya: this ˹vocative˺ call is figurative, in other words ˹it is to be understood as˺ ‘Come ˹O good news˺, now is your time!’) ‘This is a young boy’. His brothers became aware of this and came to him, and they hid him, that is, they disguised his real status, claiming that he was, as ˹a piece of˺ merchandise, by saying, ‘This is a slave of ours: he is a runaway’; but Joseph did not say anything, fearing that they might kill him. But God knew well what they were doing.
القرآن:١٢:١٩

وَجَاءَتْ سَيَّارَةٌ فَأَرْسَلُوا وَارِدَهُمْ فَأَدْلَىٰ دَلْوَهُ ۖ قَالَ يَا بُشْرَىٰ هَٰذَا غُلَامٌ ۚ وَأَسَرُّوهُ بِضَاعَةً ۚ وَاللَّهُ عَلِيمٌ بِمَا يَعْمَلُونَ  

{وجاءت سيارة} مسافرون من مدين إلى مصر فنزلوا قريبا من جب يوسف {فأرسلوا واردهم} الذي يرد الماء ليستقي منه {فأدلى} أرسل {دلوه} في البئر فتعلق بها يوسف فأخرجه فلما رآه {قال يا بشراي} وفي قراءة بشرى ونداؤها مجاز أي احضري فهذا وقتك {هذا غلام} فعلم به إخوته فأتوه {وأسَرُّوه} أي أخفوا أمره جاعليه {بضاعة} بأن قالوا هذا عبدنا أبق، وسكت يوسف خوفا من أن يقتلوه {والله عليم بما يعملون}.