He traced it back to the Prophet ﷺ, who said, "Allah does not look at your appearances or your wealth, but rather He looks at your deeds and your hearts."
حدثنا أحمد بن سنان حدثنا كثير بن هشام حدثنا جعفر بن برقان حدثنا يزيد بن الأصم
رفعه إلى النبي ﷺ قال إن الله لا ينظر إلى صوركم وأموالكم ولكن إنما ينظر إلى أعمالكم وقلوبكم
Muslim narrated it in the Book of Righteousness and Kinship Ties, in the chapter on the prohibition of a Muslim wronging another Muslim, forsaking him, belittling him, and violating his blood, honor, or wealth, hadith 34/2564, from the hadith of Kathir, with similar wording.