The Messenger of Allah ﷺ said, "This good consists of treasures, and those treasures have keys. Blessed is the servant whom Allah has made a key to good and a lock against evil, and woe to the servant whom Allah has made a key to evil and a lock against good."
حدثنا هارون بن سعيد الأيلي أبو جعفر حدثنا عبد الله بن وهب أخبرني عبد الرحمن بن زيد بن أسلم عن أبي حازم
أن رسول الله ﷺ قال إن هذا الخير خزائن ولتلك الخزائن مفاتيح فطوبى لعبد جعله الله مفتاحا للخير مغلاقا للشر وويل لعبد جعله الله مفتاحا للشر مغلاقا للخير
No references are available.
[Its chain is daif] Isfahani narrated it in Hilyah 8/329 from the hadith of Harun bin Saeed, with this chain, and said, "Gharib"... etc. Abdul-Rahman bin Zayd is daif, as stated in Taqrib and elsewhere.