Ibn Shihab al-Zuhri (may Allah have mercy on him) said: It reached us that Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) said: Do not concern yourself with what does not concern you; keep away from your enemy; be on your guard against your friend, except the trustworthy one, for nothing equals the trustworthy one; do not befriend the wicked person, for he will teach you his wickedness; do not reveal your secret to him; and in matters of your religion, consult those who fear Allah.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب آداب القاضي / 20325