Deuteronomy 17:3
2 Suppose a man or woman is discovered among you in one of your villages that the Lord your God is giving you who sins before the Lord your God and breaks his covenant 3 by serving other gods and worshiping them—the sun, moon, or any other heavenly bodies that I have not permitted you to worship. 4 When it is reported to you and you hear about it, you must investigate carefully. If it is indeed true that such a disgraceful thing is being done in Israel, 5 you must bring to your city gates that man or woman who has done this wicked thing—that very man or woman—and you must stone that person to death.
Zephaniah 1:5
4 “I will attack Judah and all who live in Jerusalem. I will remove from this place every trace of Baal worship, as well as the very memory of the pagan priests. 5 I will remove those who worship the stars in the sky from their rooftops, those who swear allegiance to the Lord while taking oaths in the name of their ‘king,’ 6 and those who turn their backs on the Lord and do not want the Lord’s help or guidance.”
Notes and References
"... The reference to astral bodies as the object of illicit worship is found once in Deuteronomy proper (17:3). Within the compass of the history, it occurs five times, all in places which have been considered secondary to the basic compilation: Deuteronomy 4:19; 2 Kings 17:16; 21:3, 5: 23:4, 5. It is also found in Jeremiah 8:2 and 19:13 and Zephaniah 1:5. With this expression and example 13, the net of usage has been extended to include the judgment on Manasseh in 2 Kings 21, a sermonic judgment that must belong to a writer after the time of Josiah and which must be the exilic editor if our thesis is correct ..."
Nelson, Richard D. The Double Redaction of the Deuteronomistic History (p. 59) JSOT Press, 1981