"As the harlot who made her deeds comely..."

(א) וַיִּשְׁלַ֣ח יְהוֹשֻׁ֣עַ־בִּן־נ֠וּן מִֽן־הַשִּׁטִּ֞ים שְׁנַֽיִם־אֲנָשִׁ֤ים מְרַגְּלִים֙ חֶ֣רֶשׁ לֵאמֹ֔ר לְכ֛וּ רְא֥וּ אֶת־הָאָ֖רֶץ וְאֶת־יְרִיח֑וֹ וַיֵּ֨לְכ֜וּ וַ֠יָּבֹאוּ בֵּית־אִשָּׁ֥ה זוֹנָ֛ה וּשְׁמָ֥הּ רָחָ֖ב וַיִּשְׁכְּבוּ־שָֽׁמָּה׃ (ב) וַיֵּ֣אָמַ֔ר לְמֶ֥לֶךְ יְרִיח֖וֹ לֵאמֹ֑ר הִנֵּ֣ה אֲ֠נָשִׁים בָּ֣אוּ הֵ֧נָּה הַלַּ֛יְלָה מִבְּנֵ֥י יִשְׂרָאֵ֖ל לַחְפֹּ֥ר אֶת־הָאָֽרֶץ׃ (ג) וַיִּשְׁלַח֙ מֶ֣לֶךְ יְרִיח֔וֹ אֶל־רָחָ֖ב לֵאמֹ֑ר ה֠וֹצִיאִי הָאֲנָשִׁ֨ים הַבָּאִ֤ים אֵלַ֙יִךְ֙ אֲשֶׁר־בָּ֣אוּ לְבֵיתֵ֔ךְ כִּ֛י לַחְפֹּ֥ר אֶת־כָּל־הָאָ֖רֶץ בָּֽאוּ׃ (ד) וַתִּקַּ֧ח הָֽאִשָּׁ֛ה אֶת־שְׁנֵ֥י הָאֲנָשִׁ֖ים וַֽתִּצְפְּנ֑וֹ וַתֹּ֣אמֶר ׀ כֵּ֗ן בָּ֤אוּ אֵלַי֙ הָֽאֲנָשִׁ֔ים וְלֹ֥א יָדַ֖עְתִּי מֵאַ֥יִן הֵֽמָּה׃ (ה) וַיְהִ֨י הַשַּׁ֜עַר לִסְגּ֗וֹר בַּחֹ֙שֶׁךְ֙ וְהָאֲנָשִׁ֣ים יָצָ֔אוּ לֹ֣א יָדַ֔עְתִּי אָ֥נָה הָלְכ֖וּ הָֽאֲנָשִׁ֑ים רִדְפ֥וּ מַהֵ֛ר אַחֲרֵיהֶ֖ם כִּ֥י תַשִּׂיגֽוּם׃ (ו) וְהִ֖יא הֶעֱלָ֣תַם הַגָּ֑גָה וַֽתִּטְמְנֵם֙ בְּפִשְׁתֵּ֣י הָעֵ֔ץ הָעֲרֻכ֥וֹת לָ֖הּ עַל־הַגָּֽג׃ (ז) וְהָאֲנָשִׁ֗ים רָדְפ֤וּ אַֽחֲרֵיהֶם֙ דֶּ֣רֶךְ הַיַּרְדֵּ֔ן עַ֖ל הַֽמַּעְבְּר֑וֹת וְהַשַּׁ֣עַר סָגָ֔רוּ אַחֲרֵ֕י כַּאֲשֶׁ֛ר יָצְא֥וּ הָרֹדְפִ֖ים אַחֲרֵיהֶֽם׃ (ח) וְהֵ֖מָּה טֶ֣רֶם יִשְׁכָּב֑וּן וְהִ֛יא עָלְתָ֥ה עֲלֵיהֶ֖ם עַל־הַגָּֽג׃ (ט) וַתֹּ֙אמֶר֙ אֶל־הָ֣אֲנָשִׁ֔ים יָדַ֕עְתִּי כִּֽי־נָתַ֧ן יְהוָ֛ה לָכֶ֖ם אֶת־הָאָ֑רֶץ וְכִֽי־נָפְלָ֤ה אֵֽימַתְכֶם֙ עָלֵ֔ינוּ וְכִ֥י נָמֹ֛גוּ כָּל־יֹשְׁבֵ֥י הָאָ֖רֶץ מִפְּנֵיכֶֽם׃ (י) כִּ֣י שָׁמַ֗עְנוּ אֵ֠ת אֲשֶׁר־הוֹבִ֨ישׁ יְהוָ֜ה אֶת־מֵ֤י יַם־סוּף֙ מִפְּנֵיכֶ֔ם בְּצֵאתְכֶ֖ם מִמִּצְרָ֑יִם וַאֲשֶׁ֣ר עֲשִׂיתֶ֡ם לִשְׁנֵי֩ מַלְכֵ֨י הָאֱמֹרִ֜י אֲשֶׁ֨ר בְּעֵ֤בֶר הַיַּרְדֵּן֙ לְסִיחֹ֣ן וּלְע֔וֹג אֲשֶׁ֥ר הֶחֱרַמְתֶּ֖ם אוֹתָֽם׃ (יא) וַנִּשְׁמַע֙ וַיִּמַּ֣ס לְבָבֵ֔נוּ וְלֹא־קָ֨מָה ע֥וֹד ר֛וּחַ בְּאִ֖ישׁ מִפְּנֵיכֶ֑ם כִּ֚י יְהוָ֣ה אֱלֹֽהֵיכֶ֔ם ה֤וּא אֱלֹהִים֙ בַּשָּׁמַ֣יִם מִמַּ֔עַל וְעַל־הָאָ֖רֶץ מִתָּֽחַת׃ (יב) וְעַתָּ֗ה הִשָּֽׁבְעוּ־נָ֥א לִי֙ בַּֽיהוָ֔ה כִּי־עָשִׂ֥יתִי עִמָּכֶ֖ם חָ֑סֶד וַעֲשִׂיתֶ֨ם גַּם־אַתֶּ֜ם עִם־בֵּ֤ית אָבִי֙ חֶ֔סֶד וּנְתַתֶּ֥ם לִ֖י א֥וֹת אֱמֶֽת׃ (יג) וְהַחֲיִתֶ֞ם אֶת־אָבִ֣י וְאֶת־אִמִּ֗י וְאֶת־אַחַי֙ וְאֶת־אחותי [אַחְיוֹתַ֔י] וְאֵ֖ת כָּל־אֲשֶׁ֣ר לָהֶ֑ם וְהִצַּלְתֶּ֥ם אֶת־נַפְשֹׁתֵ֖ינוּ מִמָּֽוֶת׃ (יד) וַיֹּ֧אמְרוּ לָ֣הּ הָאֲנָשִׁ֗ים נַפְשֵׁ֤נוּ תַחְתֵּיכֶם֙ לָמ֔וּת אִ֚ם לֹ֣א תַגִּ֔ידוּ אֶת־דְּבָרֵ֖נוּ זֶ֑ה וְהָיָ֗ה בְּתֵת־יְהוָ֥ה לָ֙נוּ֙ אֶת־הָאָ֔רֶץ וְעָשִׂ֥ינוּ עִמָּ֖ךְ חֶ֥סֶד וֶאֱמֶֽת׃ (טו) וַתּוֹרִדֵ֥ם בַּחֶ֖בֶל בְּעַ֣ד הַֽחַלּ֑וֹן כִּ֤י בֵיתָהּ֙ בְּקִ֣יר הַֽחוֹמָ֔ה וּבַֽחוֹמָ֖ה הִ֥יא יוֹשָֽׁבֶת׃ (טז) וַתֹּ֤אמֶר לָהֶם֙ הָהָ֣רָה לֵּ֔כוּ פֶּֽן־יִפְגְּע֥וּ בָכֶ֖ם הָרֹדְפִ֑ים וְנַחְבֵּתֶ֨ם שָׁ֜מָּה שְׁלֹ֣שֶׁת יָמִ֗ים עַ֚ד שׁ֣וֹב הָרֹֽדְפִ֔ים וְאַחַ֖ר תֵּלְכ֥וּ לְדַרְכְּכֶֽם׃ (יז) וַיֹּאמְר֥וּ אֵלֶ֖יהָ הָאֲנָשִׁ֑ים נְקִיִּ֣ם אֲנַ֔חְנוּ מִשְּׁבֻעָתֵ֥ךְ הַזֶּ֖ה אֲשֶׁ֥ר הִשְׁבַּעְתָּֽנוּ׃ (יח) הִנֵּ֛ה אֲנַ֥חְנוּ בָאִ֖ים בָּאָ֑רֶץ אֶת־תִּקְוַ֡ת חוּט֩ הַשָּׁנִ֨י הַזֶּ֜ה תִּקְשְׁרִ֗י בַּֽחַלּוֹן֙ אֲשֶׁ֣ר הוֹרַדְתֵּ֣נוּ ב֔וֹ וְאֶת־אָבִ֨יךְ וְאֶת־אִמֵּ֜ךְ וְאֶת־אַחַ֗יִךְ וְאֵת֙ כָּל־בֵּ֣ית אָבִ֔יךְ תַּאַסְפִ֥י אֵלַ֖יִךְ הַבָּֽיְתָה׃ (יט) וְהָיָ֡ה כֹּ֣ל אֲשֶׁר־יֵצֵא֩ מִדַּלְתֵ֨י בֵיתֵ֧ךְ ׀ הַח֛וּצָה דָּמ֥וֹ בְרֹאשׁ֖וֹ וַאֲנַ֣חְנוּ נְקִיִּ֑ם וְ֠כֹל אֲשֶׁ֨ר יִֽהְיֶ֤ה אִתָּךְ֙ בַּבַּ֔יִת דָּמ֣וֹ בְרֹאשֵׁ֔נוּ אִם־יָ֖ד תִּֽהְיֶה־בּֽוֹ׃ (כ) וְאִם־תַּגִּ֖ידִי אֶת־דְּבָרֵ֣נוּ זֶ֑ה וְהָיִ֣ינוּ נְקִיִּ֔ם מִשְּׁבֻעָתֵ֖ךְ אֲשֶׁ֥ר הִשְׁבַּעְתָּֽנוּ׃ (כא) וַתֹּ֙אמֶר֙ כְּדִבְרֵיכֶ֣ם כֶּן־ה֔וּא וַֽתְּשַׁלְּחֵ֖ם וַיֵּלֵ֑כוּ וַתִּקְשֹׁ֛ר אֶת־תִּקְוַ֥ת הַשָּׁנִ֖י בַּחַלּֽוֹן׃

(1) And Joshua the son of Nun sent out of Shittim two spies secretly, saying: ‘Go view the land, and Jericho.’ And they went, and came into the house of a harlot whose name was Rahab, and lay there. (2) And it was told the king of Jericho, saying: ‘Behold, there came men in hither to-night of the children of Israel to search out the land.’ (3) And the king of Jericho sent unto Rahab, saying: ‘Bring forth the men that are come to thee, that are entered into thy house; for they are come to search out all the land.’ (4) And the woman took the two men, and hid them; and she said: ‘Yea, the men came unto me, but I knew not whence they were; (5) and it came to pass about the time of the shutting of the gate, when it was dark, that the men went out; whither the men went I know not; pursue after them quickly; for ye shall overtake them.’ (6) But she had brought them up to the roof, and hid them with the stalks of flax, which she had spread out upon the roof. (7) And the men pursued after them the way to the Jordan unto the fords; and as soon as they that pursued after them were gone out, the gate was shut. (8) And before they were laid down, she came up unto them upon the roof; (9) and she said unto the men: ‘I know that the LORD hath given you the land, and that your terror is fallen upon us, and that all the inhabitants of the land melt away before you. (10) For we have heard how the LORD dried up the water of the Red Sea before you, when ye came out of Egypt; and what ye did unto the two kings of the Amorites, that were beyond the Jordan, unto Sihon and to Og, whom ye utterly destroyed. (11) And as soon as we had heard it, our hearts did melt, neither did there remain any more spirit in any man, because of you; for the LORD your God, He is God in heaven above, and on earth beneath. (12) Now therefore, I pray you, swear unto me by the LORD, since I have dealt kindly with you, that ye also will deal kindly with my father’s house—and give me a true token— (13) and save alive my father, and my mother, and my brethren, and my sisters, and all that they have, and deliver our lives from death.’ (14) And the men said unto her: ‘Our life for yours, if ye tell not this our business; and it shall be, when the LORD giveth us the land, that we will deal kindly and truly with thee.’ (15) Then she let them down by a cord through the window; for her house was upon the side of the wall, and she dwelt upon the wall. (16) And she said unto them: ‘Get you to the mountain, lest the pursuers light upon you; and hide yourselves there three days, until the pursuers be returned; and afterward may ye go your way.’ (17) And the men said unto her: ‘We will be guiltless of this thine oath which thou hast made us to swear. (18) Behold, when we come into the land, thou shalt bind this line of scarlet thread in the window which thou didst let us down by; and thou shalt gather unto thee into the house thy father, and thy mother, and thy brethren, and all thy father’s household. (19) And it shall be, that whosoever shall go out of the doors of thy house into the street, his blood shall be upon his head, and we will be guiltless; and whosoever shall be with thee in the house, his blood shall be on our head, if any hand be upon him. (20) But if thou utter this our business, then we will be guiltless of thine oath which thou hast made us to swear.’ (21) And she said: ‘According unto your words, so be it.’ And she sent them away, and they departed; and she bound the scarlet line in the window. (22) And they went, and came unto the mountain, and abode there three days, until the pursuers were returned; and the pursuers sought them throughout all the way, but found them not. (23) Then the two men returned, and descended from the mountain, and passed over, and came to Joshua the son of Nun; and they told him all that had befallen them. (24) And they said unto Joshua: ‘Truly the LORD hath delivered into our hands all the land; and moreover all the inhabitants of the land do melt away before us.’

(כה) וְֽאֶת־רָחָ֣ב הַ֠זּוֹנָה וְאֶת־בֵּ֨ית אָבִ֤יהָ וְאֶת־כָּל־אֲשֶׁר־לָהּ֙ הֶחֱיָ֣ה יְהוֹשֻׁ֔עַ וַתֵּ֙שֶׁב֙ בְּקֶ֣רֶב יִשְׂרָאֵ֔ל עַ֖ד הַיּ֣וֹם הַזֶּ֑ה כִּ֤י הֶחְבִּ֙יאָה֙ אֶת־הַמַּלְאָכִ֔ים אֲשֶׁר־שָׁלַ֥ח יְהוֹשֻׁ֖עַ לְרַגֵּ֥ל אֶת־יְרִיחֽוֹ׃ (פ)

(25) But Rahab the harlot, and her father’s household, and all that she had, did Joshua save alive; and she dwelt in the midst of Israel, unto this day; because she hid the messengers, whom Joshua sent to spy out Jericho.

(כט) אַל־תְּחַלֵּ֥ל אֶֽת־בִּתְּךָ֖ לְהַזְנוֹתָ֑הּ וְלֹא־תִזְנֶ֣ה הָאָ֔רֶץ וּמָלְאָ֥ה הָאָ֖רֶץ זִמָּֽה׃

(29) Profane not thy daughter, to make her a harlot, lest the land fall into harlotry, and the land become full of lewdness.

ר"א אומר קריעת ים סוף שמע ובא שנא' (יהושע ה, א) ויהי כשמוע כל מלכי האמורי ואף רחב הזונה אמרה לשלוחי יהושע (יהושע ב, י) כי שמענו את אשר הוביש ה' את מי ים סוף מאי שנא התם דאמר (ליה) (יהושע ה, א) ולא היה בם עוד רוח ומ"ש הכא דקאמר (יהושע ב, יא) ולא קמה עוד רוח באיש

R. Eleazar said: He heard about the dividing of the Red Sea, and came, for it is said, And it came to pass, when all the kings of the Amorites heard [. . . how that the Lord had dried up the waters of the Jordan before the children of Israel] ;and Rahab the harlot too said to Joshua's messengers [spies]: For we have heard how the Lord dried up the water of the Red Sea. Why is, 'neither was there spirit in them any more written in the first text, whereas in the second it says, 'neither did there remain [stand] any more spirit in any man'?...

דאפילו אקשויי נמי לא אקשו ומנא ידעה דאמר מר אין לך כל שר ונגיד שלא בא על רחב הזונה אמרו בת י' שנים היתה כשיצאו ישראל ממצרים וזנתה [כל] מ' שנה שהיו ישראל במדבר אחר נ' שנה נתגיירה אמרה יהא מחול לי בשכר חבל חלון ופשתים:

- [She meant that] they even lost their virility. And how did she know this? - Because, as a master said, There was no prince or ruler who had not possessed Rahab the harlot. It was said: She was ten years old when the Israelites departed from Egypt, and she played the harlot the whole of the forty years spent by the Israelites in the wilderness. At the age of fifty she became a proselyte. Said she: May I be forgiven as a reward for the cord, window, and flax.

דבר אחר בחדש השביעי פתח והוא ישפוט תבל בצדק ידין לאומים במישרים (תהלים ט' ט') מהו במישרים אמר ר' אלכסנדרי דן את האומות במישרים שלהם ברחב ביתרו ברות כיצד אומר לאומות העולם למה לא קרבת אצלי והוא אומר שהייתי רשע מוחלט והייתי מתבייש והוא אומר לו וכי יותר היית מרחב שהיה ביתה בקיר החומה והייתה מקבלת את הליסטים ומזנה מבפנים וכשנתקרבה אצלי לא קיבלתיה והעמדתי ממנה נביאים וצדיקים

Pesikta Rabbati 40:3

"And He will judge the world in righteousness, He will minister judgment to the peoples with uprightness." [Psalms 9:9] What is the meaning of "uprightness"? Rabbi Alexsandri said: He judged the nations with the uprightness they [possessed]. [For example] Rahab, Jethro and Ruth. How will He speak to the nations of the world? [He will say]: "Why did you not bring yourself closer to me?" And he will say: "I was a utterly evil person and I was embarrassed." And He said to him: "You were no more so than Rahab whose house was in the city wall and she received robbers and prostituted with them within. Nevertheless, she drew close to me and did I not welcome her and raise up prophets and righteous people from her?"

(ד) פסקא יג אות ד (ד) ר' יהושע דסכנין בשם ר' לוי פתח עבד משכיל ימשל בבן מביש ובתוך אחים יחלק נחלה (משלי יז ב) עבד משכיל זה ירמיה ימשל בבן מביש אילו ישר' שביישו את עצמן לע"ז א"ר אבא בר כהנא כתיב ולא היית כזונה לקלס אתנן (יחזקאל טז לא) ייתי ברא דמקלקלתה דתקנת עובדיה ויוכח לברא דמתקנתה דקלקלת עובדיה את מוצא כל מה שכת' בישר' לגניי כתוב ברחב לשבח ברחב כת' ועתה השבעו נא לי בי"י כי עשיתי עמכם חסד (יהושע ב יב) ובישר' כת' אכן לשקר ישבעו (ירמיה ה ב) ברחב כת' והחייתם את אבי ואת אמי (יהושע ב יג) ובישר' כת' אב ואם הקלו בך (יחזקאל כב ז) ברחב כת' והיא העלתם הגגה (יהושע שם ו') ובישר' כת' ואת המשתחוים על הגגות לצבא השמים (צפניה א ה) ברחב כת' ותטמנם בפשתי העץ (יהושע שם) ובישר' כת' אומרים לעץ אבי אתה (ירמיה ב כז) ברחב כת' ותאמר להם ההרה לכו (יהושע ב טז) ובישר' כת' על ראשי ההרים יזבחו (הושע ד יג) ברחב כת' ונתתם לי אות אמת (יהושע ב יב) ובישר' כת' ואמת לא ידברו (ירמיה ט ד) הווי כל מה שכת' בישר' לגניי ברחב כת' לשבח ובתוך אחים יחלק נחלה (משלי שם)

Rabbi Joshua of Sikhnin, in the name of Rabbi Levi began to speak: "A capable servant will dominate an incompetent son and share the inheritance with the brothers..." [Prov. 17:2] A capable servant this is Jeremiah. will dominate an incompetent son this is Israel which brought shame on itself through the practice of idolatry. Said R' Abba bar Kahana, it is written: "Yet you were not like a prostitute, for you spurned fees."...Everything that is written about Israel in disgrace is written about Rahab in praise. Regarding Rahab it is written : "Now since I have shown loyalty to you, swear to me by the Lord that you in turn will show loyalty to my family. [Josh. 2:12] And regarding Israel it is written , "Even when they say, 'As the Lord lives' they are sure to be swearing falsely." [Jer. 5:2] With regard to Rahab "That you will spare the lives of my mother and father." [Josh. 2:13] And regarding Israel it is written: "Fathers and mothers have been humiliated within you." [Ezek. 22:7] With regard to Rahab it is written: "Now she had taken them up to the roof." [Josh. 2:6]. With regard to Israel it is written: "And those who bow down to the roofs, to the host of heaven." [Zeph.1:5] With regard to Rahab it is written: "and hid them with the stalks of flax..." [Josh. 2:6] With regard to Israel it is written: "They say to wood, 'You are my father.'" [Jer. 2:27] With regard to Rahab it is written: "Make for the hills...[Josh. 2:16] With regard to Israel it is written: "They sacrifice on mountaintops," [Hosea 4:13] With regard to Rahab it is written: "Provide me with a reliable [lit. truthful] sign." [Josh. 2:12] With regard to Israel it is written: "They will not speak truth." [Jer. 9:4] Therefore everything that was written about Israel in disgrace, with regard to Rahab it was written in praise. "And share the inheritance with the brothers." [Prov. 16:2]

שמונה נביאים והם כהנים יצאו מרחב הזונה ואלו הן נריה ברוך ושריה מחסיה ירמיה חלקיה חנמאל ושלום רבי יהודה אומר אף חולדה הנביאה מבני בניה של רחב הזונה היתה כתיב הכא בן תקוה וכתיב התם (יהושע ב, יח) את תקות חוט השני אמר ליה עינא סבא ואמרי לה פתיא אוכמא מיני ומינך תסתיים שמעתא דאיגיירא ונסבה יהושע ומי הוו ליה זרעא ליהושע והכתיב (דברי הימים א ז, כז) נון בנו יהושע בנו בני לא הוו ליה בנתן הוו ליה

Eight prophets who are priests come out from Rahab the harlot, and they are: Neriyah, Baruch, and Serayah; Mahseyah, Jeremiah, Hilkiah, Hanamel, and Shallum. Rabbi Yehudah says: Even Huldah the prophetess was from the descendants of Rahab the harlot. Here it is written "son of Tikvah", and there it is written (Joshua 2:18) "the cord (tikvat) of scarlet thread". [Rav Nahman] said to him: Ena the Elder! And some say 'black vessel', my word and your word [form] a treasured outcome... That [Rahab] became a convert and she married Joshua. But did Joshua have any offspring? And isn't it written (I Chronicles 7:27) "Nun his son, Joshua his son"? He did not have sons, but he did have daughters.

Bemidbar Rabbah 8:9

The text is speaking about a righteous proselyte, who merits to marry her daughter to a priest, and from her sons and grandsons, they become the priests who bless Israel and say the trifold blessing. Therefore it says: "Peace unto Israel," in the same manner as Rahab the harlot who welcomed the spies into her house and rescued them. God elevated her as if she had performed the act for Him and bestowed on her a reward. And therefore he said "And the woman took the two men and hid them..." [Josh. 2:4] But it doesn't say she hid them but she hid him [third person singular]. And what was her reward? Some of her daughters were married into the priesthood and they gave birth to sons who stood on the altar and performed its service. They would enter the sanctuary and bless Israel with the Tetragrammaton. And these were their names: Baruch ben Neriyah and Seryah ben Machsiyah and Jeremiah ben Helkiah and Chanamel ben Shalom. Therefore we learn that the Torah is teaching about none other than true proselytes, thus it is written: "And see thy children's children. Peace be upon Israel!" Psalms 128]

אלא בגר צדק הכתוב מדבר, שזוכה שמשיא בתו לכהן, וזוכה ועומדים מבניה, שהם בני בניו כהנים שמברכין את ישראל, ואומר: יברכך וגו' יאר ה' וגו' ישא ה' וגו', לכך נאמר: שלום על ישראל, כשם שמצינו ברחב הזונה, על שהכניסה את המרגלים לביתה ומלטה אותם, העלה עליה הקב"ה, כאלו עמו עשתה ונתן לה שכרה. וכן הוא אומר (יהושע ב): ותקח האשה את שני האנשים ותצפנם אין כתיב כאן, אלא ותצפנו. ומה שכר נטלה? שנשאו מבנותיה לכהונה וילדו בנים שהיו עומדים ומשמשים ע"ג המזבח, והיו נכנסין למקדש ומברכין את ישראל בשם המפורש, ואלו הן: ברוך בן נריה ושריה בן מחסיה וירמיה בן חלקיה וחנמאל בן שלום הרי למדנו שאין הכתוב מדבר אלא בגרי הצדק, לכך נאמר (תהלים קכח): וראה בנים לבניך שלום על ישראל.

Sifrei Bemidbar 78

If those, who drew near (to Israel), were thus drawn near by the Lord, then Israelites who do the will of the Lord, how much more so (will He draw them near!) And thus do you find with Rachav Hazonah. What is written (of her)? (I Chronicles 4:21) "And the families of the house of the linen work, of the house of Ashbea": "the families" — Rachav Hazonah ("the feeder"), who kept an inn to feed her family. "the linen work" — She hid the spies among the linens. "the house of Ashbea" — The spies swore ("nisb'u") to her (to spare her family).