In a dream they are witnesses, or leaders by whom people are guided. God the Exalted said:
أَمْ لَمْ يُنَبَّأْ بِمَا فِى صُحُفِ مُوسَىٰ وَإِبْرَٰهِيمَ ٱلَّذِى وَفَّىٰٓ
“Or has he not been informed of what was in the scriptures of Moses And [of] Abraham, who fulfilled [his obligations] -”
Quran 53:36–37 · Saheeh International
And the Exalted said:
إِنَّ هَـٰذَا لَفِى ٱلصُّحُفِ ٱلْأُولَىٰ صُحُفِ إِبْرَٰهِيمَ وَمُوسَىٰ
“Indeed, this is in the former scriptures, The scriptures of Abraham and Moses.”
Quran 87:18–19 · Saheeh International
Scriptures signify knowledge and guidance, and true news.