2:158
إِنَّ ٱل صَّفَا وَ ٱلْ مَرْوَةَ مِن شَعَآئِرِ ٱللَّهِ فَ مَنْ حَجَّ ٱلْ بَيْتَ أَوِ ٱعْتَمَرَ فَ لَا جُنَاحَ عَلَيْ هِ أَن يَطَّوَّفَ بِ هِمَا وَ مَن تَطَوَّعَ خَيْرًا فَ إِنَّ ٱللَّهَ شَاكِرٌ عَلِيمٌ
Indeed, as-Safa and al-Marwah are among the symbols of Allah. So whoever makes Hajj to the House or performs 'umrah - there is no blame upon him for walking between them. And whoever volunteers good - then indeed, Allah is appreciative and Knowing.