Another interpretation: AFTER THESE THINGS (Genesis 15:1). This is what Scripture says: "He reserves sound wisdom for the upright" (Proverbs 2:7). [What is the meaning of "He reserves sound wisdom for the upright"?] Rather, before the world was created, the Holy One, blessed be He, reserved the Torah for Abraham, as it is said, "Because Abraham obeyed My voice" (Genesis 26:5). This teaches that Abraham kept all the commandments and all the Torahs. Rabbi Samuel bar Nahmani said in the name of Rabbi Jonathan: Our father Abraham even observed the law of the mingling of cooked foods (eruv tavshilin), as it is said, "Because Abraham obeyed My voice" (Genesis 26:5). Therefore Solomon said, "He reserves sound wisdom for the upright, [a shield to those who walk in integrity]" (Proverbs 2:7). The Holy One, blessed be He, said to Abraham: You have occupied yourself with My Torah; by your life, I am a shield for you, as it is said, "Fear not, Abram, [I am a shield to you]" (Genesis 15:1). Just as when a man grasps the shield, even if arrows and stones are hurled at him he has no fear, [so I do for you], as it is said, "I am a shield to you; your reward shall be exceedingly great" (Genesis 15:1) - not for you alone, but even for your children, if they will occupy themselves with My Torah just as you have occupied yourself, as it is said, "[Every] word of God is pure; He is a shield to those who take refuge in Him" (Proverbs 30:5). Therefore it is said, "He reserves sound wisdom for the upright, [a shield to those who walk in integrity]" (Proverbs 2:7).
Abraham the Shield - Torah Reserved for the Upright in Tanchuma
Midrash Tanchuma Buber, Lech Lecha 14:1
ד"א אחר הדברים האלה, זש"ה יצפון לישרים תושיה (משלי ב ז), [מהו יצפון לישרים תושיה], אלא עד שלא נברא העולם, צפן הקב"ה את התורה לאברהם, שנאמר עקב אשר שמע אברהם בקולי (בראשית כו ה), מלמד ששמר אברהם כל המצות וכל התורות. אמר ר' שמואל בר נחמני אמר ר' יונתן אף עירובי תבשילין קיים אברהם אבינו, שנאמר עקב אשר שמע אברהם בקולי, לכך אמר שלמה יצפון לישראים תושיה [מגן להולכי תם] (משלי ב ז), אמר הקב"ה לאברהם אתה עסקתי בתורתי חייך שאני מגן לך, שנאמר אל תירא אברם [אנכי מגן לך], כשם כשאדם אוחז את המגן, אפילו חצים ואבנים נזרקים עליו אינו חושש, [כך אני עושה לך], שנאמר אנכי מגן לך שכרך הרבה מאד, לא לך לבד, אלא אף לבניך, אם יהו עסוקים בתורתי, כשם שעסקת אתה, שנאמר [כל] אמרת אלוה צרופה מגן הוא (לשל החוסים) [לחוסים] בו (שם ל ה), לכך נאמר יצפון לישרים תושיה [מגן להולכי תם].