N.Y. Const. art. I, § 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.