I heard the Messenger of Allah ﷺ say, "Deeds are like a vessel. When its bottom is sound, its top is sound, and when its bottom is corrupt, its top is corrupt."
حدثنا عثمان بن إسمعيل بن عمران الدمشقي حدثنا الوليد بن مسلم حدثنا عبد الرحمن بن يزيد بن جابر حدثني أبو عبد رب قال سمعت
سمعت رسول الله ﷺ يقول إنما الأعمال كالوعاء إذا طاب أسفله طاب أعلاه وإذا فسد أسفله فسد أعلاه
[Hasan] Mizzi narrated it in Tahzib Kamal, page 1622/3, through two routes (Muhammad bin Musaffa and Amr bin Uthman) from Walid, with this wording.