Here is the text of a portion of the Senate version  of the National Defense Authorization Act marked up to indicate changes made by the conference committee. The changes in red gave the White House "flexibility" but did nothing to save the Bill of Rights from this assault.
Subtitle D--Detainee Matters
SEC. 1031. AFFIRMATION OF AUTHORITY OF THE ARMED FORCES OF THE UNITED STATES TO DETAIN COVERED PERSONS PURSUANT TO THE AUTHORIZATION FOR USE OF MILITARY FORCE.
(a) In General- Congress affirms that the authority of the President to use all necessary and appropriate force pursuant to the Authorization for Use of Military Force (Public Law 107-40) includes the authority for the Armed Forces of the United States to detain covered persons (as defined in subsection (b)) pending disposition under the law of war.
(b) Covered Persons- A covered person under this section is any person as follows:
(1) A person who planned, authorized, committed, or aided the terrorist attacks that occurred on September 11, 2001, or harbored those responsible for those attacks.
(2) A person who was a part of or substantially supported al-Qaeda, the Taliban, or associated forces that are engaged in hostilities against the United States or its coalition partners, including any person who has committed a belligerent act or has directly supported such hostilities in aid of such enemy forces.
(c) Disposition Under Law of War- The disposition of a person under the law of war as described in subsection (a) may include the following:
(1) Detention under the law of war without trial until the end of the hostilities authorized by the Authorization for Use of Military Force.
(2) Trial under chapter 47A of title 10, United States Code (as amended by the Military Commissions Act of 2009 (title XVIII of Public Law 111-84)).
(3) Transfer for trial by an alternative court or competent tribunal having lawful jurisdiction.
(4) Transfer to the custody or control of the person's country of origin, any other foreign country, or any other foreign entity.
(d) Construction- Nothing in this section is intended to limit or expand the authority of the President or the scope of the Authorization for Use of Military Force.
(e) Authorities- Nothing in this section shall be construed to affect existing law or authorities, relating to the detention of United States citizens, lawful resident aliens of the United States or any other persons who are captured or arrested in the United States.
(f) Requirement for Briefings of Congress- The Secretary of Defense shall regularly brief Congress regarding the application of the authority described in this section, including the organizations, entities, and individuals considered to be `covered persons' for purposes of subsection (b)(2).
SEC. 1032. REQUIREMENT FOR MILITARY CUSTODY.
(a) Custody Pending Disposition Under Law of War-
(1) IN GENERAL- Except as provided in paragraph (4), the Armed Forces of the United States shall hold a person described in paragraph (2) who is captured in the course of hostilities authorized by the Authorization for Use of Military Force (Public Law 107-40) in military custody pending disposition under the law of war.
(2) COVERED PERSONS- The requirement in paragraph (1) shall apply to any person whose detention is authorized under section 1031 who is determined--
(A) to be a member of, or part of, al-Qaeda or an associated force that acts in coordination with or pursuant to the direction of al-Qaeda; and
(B) to have participated in the course of planning or carrying out an attack or attempted attack against the United States or its coalition partners.
(3) DISPOSITION UNDER LAW OF WAR- For purposes of this subsection, the disposition of a person under the law of war has the meaning given in section 1031(c), except that no transfer otherwise described in paragraph (4) of that section shall be made unless consistent with the requirements of section 1033.
(4) WAIVER FOR NATIONAL SECURITY- The
Secretary of Defense President may, in consultation with the Secretary of State and the Director of National Intelligence, waive the requirement of paragraph (1) if the Secretary President submits to Congress a certification in writing that such a waiver is in the national security interests of the United States.
(b) Applicability to United States Citizens and Lawful Resident Aliens-
(1) UNITED STATES CITIZENS- The requirement to detain a person in military custody under this section does not extend to citizens of the United States.
(2) LAWFUL RESIDENT ALIENS- The requirement to detain a person in military custody under this section does not extend to a lawful resident alien of the United States on the basis of conduct taking place within the United States, except to the extent permitted by the Constitution of the United States.
(c) Implementation Procedures-
(1) IN GENERAL- Not later than 60 days after the date of the enactment of this Act, the President shall issue, and submit to Congress, procedures for implementing this section.
(2) ELEMENTS- The procedures for implementing this section shall include, but not be limited to, procedures as follows:
(A) Procedures designating the persons authorized to make determinations under subsection (a)(2) and the process by which such determinations are to be made.
(B) Procedures providing that the requirement for military custody under subsection (a)(1) does not require the interruption of ongoing surveillance or intelligence gathering with regard to persons not already in the custody or control of the United States.
(C) Procedures providing that a determination under subsection (a)(2) is not required to be implemented until after the conclusion of an interrogation session which is ongoing at the time the determination is made and does not require the interruption of any such ongoing session.
(D) Procedures providing that the requirement for military custody under subsection (a)(1) does not apply when intelligence, law enforcement, or other government officials of the United States are granted access to an individual who remains in the custody of a third country.
(E) Procedures providing that a certification of national security interests under subsection (a)(4) may be granted for the purpose of transferring a covered person from a third country if such a transfer is in the interest of the United States and could not otherwise be accomplished.
(d) AUTHORITIES.—Nothing in this section shall be construed to affect the existing criminal enforcement and national security authorities of the Federal Bureau of Investigation or any other domestic law enforcement agency with regard to a covered person, regardless whether such covered person is held in military custody.
(e) Effective Date- This section shall take effect on the date that is 60 days after the date of the enactment of this Act, and shall apply with respect to persons described in subsection (a)(2) who are taken into the custody or brought under the control of the United States on or after that effective date.