3,871. The Tunnels and Wall

Hilchos Beis HaBechirah 6:9

The tunnels that open to the courtyard are holy, while those that open to the Temple Mount are secular. The windows and the top of the wall are considered inside the courtyard as far as eating sacrifices of the highest sanctity and entering the Temple Mount in a state of ritual impurity.

Hilchos Beis HaBechirah 6:10

If the Sanhedrin wishes to increase the borders of Jerusalem or of the courtyard, they may do so. The courtyard may be extended to anywhere on the Temple Mount and the walls of Jerusalem may be extended to any place they choose.