; and (B) may not provide the alien with work authorization (including an employment authorized endorsement or other appropriate work permit) or advance parole to travel outside of the United States, unless the alien is lawfully admitted for permanent residence or otherwise would (without regard to removal proceedings) be provided such authorization. (b) Revocation of bond or parole The Secretary, at any time, may revoke bond or parole authorized under subsection (a), rearrest the alien under the original warrant, and detain the alien. (c) Mandatory detention of criminal aliens (1) Criminal aliens The Secretary shall take into custody and continue to detain any alien at any time after the alien is released, without regard to whether the alien is released on parole, supervised release, and without regard to whether the alien may be arrested or imprisoned again for the same offense, if the alien— (A) (i) has not been admitted or paroled into the United States; and (ii) was apprehended anywhere within 100 miles of the international border of the United States; (B) is inadmissible by reason of having committed any offense covered in section 212(a)(2); (C) is deportable by reason of having committed any offense covered in section 237(a)(2); (D) is convicted for an offense under section 275(a); (E) is convicted for an offense under section 276; (F) is convicted for any criminal offense; or (G) is inadmissible under section 212(a)(3)(B) or deportable under section 237(a)(4)(B). (2) Release (A) In general Except as provided in subparagraph (B), the Secretary may release an alien described in paragraph (1) only if the Secretary decides pursuant to section 3251 of title 18, United States Code, and in accordance with a procedure that considers the severity of the offense committed by the alien, that— (i) release of the alien from custody is necessary to provide protection to— (I) a witness; (II) a potential witness; (III) a person cooperating with an investigation into major criminal activity