Mishkat al-Masabih 191
وَعَنِ ابْنِ مَسْعُودٍ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: ضَرَبَ اللَّهُ مَثَلًا صِرَاطًا مُسْتَقِيمًا وَعَنْ جَنَبَتَيِ الصِّرَاطِ سُورَانِ فِيهِمَا أَبْوَابٌ مُفَتَّحَةٌ وَعَلَى الْأَبْوَابِ سُتُورٌ مُرَخَاةٌ وَعِنْدَ رَأْسِ الصِّرَاطِ دَاعٍ يَقُولُ: اسْتَقِيمُوا عَلَى الصِّرَاطِ وَلَا تَعْوَجُّوا وَفَوْقَ ذَلِكَ دَاعٍ يَدْعُو كُلَّمَا هَمَّ عَبْدٌ أَنْ يَفْتَحَ شَيْئًا مِنْ تِلْكَ الْأَبْوَابِ قَالَ: وَيْحَكَ لَا تَفْتَحْهُ فَإِنَّكَ إِنْ تَفْتَحْهُ تَلِجْهُ . ثُمَّ فَسَّرَهُ فَأَخْبَرَ: أَنَّ الصِّرَاطَ هُوَ الْإِسْلَامُ وَأَنَّ الْأَبْوَابَ الْمُفَتَّحَةَ مَحَارِمُ اللَّهِ وَأَنَّ السُّتُورَ الْمُرَخَاةَ حُدُودُ اللَّهِ وَأَنَّ الدَّاعِيَ عَلَى رَأْسِ الصِّرَاطِ هُوَ الْقُرْآنُ وَأَنَّ الدَّاعِيَ مِنْ فَوْقِهِ وَاعِظُ اللَّهِ فِي قَلْبِ كُلِّ مُؤمن) رَوَاهُ رزين وَأحمد
From Ibn Masʿud that the Messenger of Allah ﷺ said: "Allah has set forth a parable: a straight path, and on the two sides of the path are two walls with open doors in them, and over the doors are curtains let down. At the head of the path is a caller saying: 'Keep straight on the path and do not turn aside.' And above that is a caller who calls out whenever a slave intends to open any of those doors: 'Woe to you, do not open it, for if you open it you will go through it.'" Then he explained it and told that the path is Islam, the open doors are the things Allah has made sacred, the curtains let down are the limits of Allah, the caller at the head of the path is the Quran, and the caller above it is Allah's admonisher in the heart of every believer. Reported by Razin and Ahmad.