[8] "My son, if sinners entice you, do not consent!" - Rabbi Shimon ben Yochai said: From whom did Solomon learn? From the wisdom of his father David, who said (Proverbs 13:21): "Sinners are pursued by evil." Therefore, Solomon foresaw with his wisdom and said, "My son, if sinners entice you, do not consent." If they say, 'So-and-so is rich; let's go and kill him and take his money,' do not listen to them, because all their thoughts are for evil. And if you do so, you will be found to be fulfilling all the commandments in the Torah, and whoever fulfills one commandment is as if he fulfilled the entire Torah, and whoever saves one soul from Israel is as if he saved a whole world, and whoever destroys one soul from Israel is as if he destroyed a whole world. Moreover, his sins are hidden from him for the future to come.
What David Taught Solomon About Resisting Sinners
Midrash Mishlei 1:8
(משלי א י): "בני! אם יפתוך חטאים - אל תבא!" - אמר רבי שמעון בן יוחאי: ממי למד שלמה? מחכמתו של דוד אביו, שאמר (משלי יג כא): "חטאים תרדף רעה", לפיכך צפה שלמה בחכמתו ואמר "בני, אם יפתוך חטאים - אל תבא", אם יאמרו 'פלוני עשיר הוא, נלך ונהרגו ונטול ממונו', אל תשמע להם, מפני שכל מחשבותם לרעה, ואם עשית כן נמצאת מקיים כל מצוות שבתורה, וכל המקיים מצוה אחת כאילו מקיים כל התורה כולה, וכל המקיים נפש אחת מישראל כאילו מקיים עולם מלא, וכל המאבד נפש אחת מישראל כאילו איבד עולם מלא, ולא עוד אלא שחטאיו צפונים לו לעתיד לבוא: