On September 18th, 2001, in response to the recent attacks on the World Trade Centers and the Pentagon, the United States Congress passed Public Law 107-40—the Authorization for Use of Military Force (AUMF) . This legislation granted the President the ability to utilize “all necessary and appropriate force” in pursuing those responsible for the September 11th attacks. This direct statutory authority utilized sections of the War Powers Resolution to grant for the President to begin acting as Commander-in-Chief of the Armed Forces with blanket approval for military action.
Drafted pursuant to the AUMF, the 2011 version of the NDAA required the Armed Forces to extend and exercise the authority vested in the President to detain and prosecute persons who they have found “to have participated in the course of planning or carrying out an attack or attempted attack against the United States or its coalition partners.” It is important to note that the requirement for the Armed Forces to detain such an individual is relieved if the subject is an American citizen or is in the United States lawfully, but this does not equate with a statement which would bar the Armed Forces from detaining such an individual if that individual otherwise falls within the authority granted by Section 1021. This is because the AUMF, which grants blanket approval for military actions based on decisions made by the President which were deemed “appropriate and necessary,” was an option extended to the Armed Forces by the NDAA, similar as to how that option was first made available to the President beginning in 2001. Until a section of law is introduced that it is neither appropriate nor necessary to infinitely detain American citizens, that legal justification remains available to the Armed Force and the President.
When Congress included the insertion of Section 1029 to the FY2013 version of the NDAA, their effort was misguided because there was never a denial of the writ of habeas corpus in courts ordained under Article III of the Constitution– only in the indefinitely military detentions and tribunals established pursuant to the Military Commissions Act and the 2011/2012 NDAA Section 1022.
 War Powers Resolution, 50 U.S. Code Chapter 33 – https://www.law.cornell.edu/uscode/text/50/chapter-33
 2011 NDAA Section 1022(a)(2)(B)
 Military Commissions Act 2009 – http://www.mc.mil/portals/0/mca20pub20law200920.pdf