Where does it say that habeas corpus may be suspended only through legislation?
Article I, Section 1. More specifically, it says that it may only be suspended by Congress, which implied by necessity an act of legislation.