New york constitution
Article I: bill of rights
Section 4

The privilege of a writ or order of habeas corpus shall not be suspended, unless, in case of rebellion or invasion, the public safety requires it.