Sefer Chasidim Siman 85
Can copy this into an AI, or connect the whole library to your assistant. For deeper learning, you can directly use the original seforim, sites, and apps.
אל תגלה לאוהבך שום דבר שתסתיר משונאך אם לא בחנתו פעמים רבות להיות אוהב נאמן פן יהפך להיות שונאך ויגלה סודך וסוד אחר אל תגל לשום אדם אם לא ברשותו:
Medieval Jewish mysticism, translated by Sholom Alchanan Singer. Northbrook, Ill. Whitehall Co., 1971
If you did not prove your friend many times to be a faithful loved one, do not reveal to your friend ¹ ed. Phillipawski, p. 16. any matter that you conceal from your enemy, lest he change and become your enemy and reveal your secret. You should not reveal to any person the secret of another without his permission.²
footnotes: ¹ Gabirol, Choice of Pearls, ² Yoma 4b.