I'm not speculating on the merits of the case and the conflict with the first amendment here, only answering the questions actually asked.
Who is responsible for determining whether those reason apply to a particular person?
Attorney General, through its delegates (Immigration Judges - IJs).
Before that determination is made, how long may a permanent resident be held in custody?
A while.
There are several different procedures in the INA for removal of permanent residents. The one that applies here, I suspect, is 8 USC 1226, and specifically:
(c) Detention of criminal aliens
(1) CustodyThe Attorney General shall take into custody any alien who—
...
(D) is inadmissible under section 1182(a)(3)(B) of this title or deportable under section 1227(a)(4)(B) of this title, or
Section 1182(a)(3)(B) is this:
(B) Terrorist activities
(i) In general
Any alien who—
(I) has engaged in a terrorist activity;
(II) a consular officer, the Attorney General, or the Secretary of Homeland Security knows, or has reasonable ground to believe, is engaged in or is likely to engage after entry in any terrorist activity (as defined in clause (iv));
(III) has, under circumstances indicating an intention to cause death or serious bodily harm, incited terrorist activity;
(IV) is a representative (as defined in clause (v)) of—
(aa) a terrorist organization (as defined in clause (vi)); or
(bb) a political, social, or other group that endorses or espouses terrorist activity;
(V) is a member of a terrorist organization described in subclause (I) or (II) of clause (vi);
(VI) is a member of a terrorist organization described in clause (vi)(III), unless the alien can demonstrate by clear and convincing evidence that the alien did not know, and should not reasonably have known, that the organization was a terrorist organization;
(VII) endorses or espouses terrorist activity or persuades others to endorse or espouse terrorist activity or support a terrorist organization;
(VIII) has received military-type training (as defined in section 2339D(c)(1) of title 18) from or on behalf of any organization that, at the time the training was received, was a terrorist organization (as defined in clause (vi)); or
(IX) is the spouse or child of an alien who is inadmissible under this subparagraph, if the activity causing the alien to be found inadmissible occurred within the last 5 years,
is inadmissible.
The news article suggests that the part I highlighted was indeed the rationale:
The Department of Homeland Security can initiate deportation proceedings against green card holders for a broad range of alleged criminal activity, including supporting a terror group.
8 USC 1227(a)(4)(B) brings us back to the same list:
(4) Security and related grounds
(B) Terrorist activities
Any alien who is described in subparagraph (B) or (F) of section 1182(a)(3) of this title is deportable.
There's also the 8 USC 1226a, which demands mandatory detention of terrorists, using the same definitions:
(a) Detention of terrorist aliens
(1) Custody
The Attorney General shall take into custody any alien who is certified under paragraph (3).
...
(3) Certification
The Attorney General may certify an alien under this paragraph if the Attorney General has reasonable grounds to believe that the alien—
(A) is described in section 1182(a)(3)(A)(i), 1182(a)(3)(A)(iii), 1182(a)(3)(B), 1227(a)(4)(A)(i), 1227(a)(4)(A)(iii), or 1227(a)(4)(B) of this title; or
(B) is engaged in any other activity that endangers the national security of the United States.
Note, that the AG decides, and needs to have reasonable grounds to believe, not necessarily a criminal conviction.
You're also asking:
If it was found that cases for revocation were being brought frivolously, what court would be able to enjoin such an abuse?
The AG has a pretty wide discretion to detain aliens as per the INA, see 1226(e):
(e) Judicial review
The Attorney General’s discretionary judgment regarding the application of this section shall not be subject to review. No court may set aside any action or decision by the Attorney General under this section regarding the detention of any alien or the revocation or denial of bond or parole.
The certification in 8 USC 1226a(a)(3) can be reviewed in Federal court:
(b) Habeas corpus and judicial review
(1) In general
Judicial review of any action or decision relating to this section (including judicial review of the merits of a determination made under subsection (a)(3) or (a)(6)) is available exclusively in habeas corpus proceedings consistent with this subsection.
Once the removal order is entered by the IJ and the administrative process is exhausted, it can be appealed (and in some cases for LPRs the appeal is automatic) under 8 USC 1535 to the United States Court of Appeals for the District of Columbia Circuit.
You also ask for how long can a person be detained.
8 USC 1226e(a)(6) has this to say:
(6) Limitation on indefinite detention
An alien detained solely under paragraph (1) who has not been removed under section 1231(a)(1)(A) of this title, and whose removal is unlikely in the reasonably foreseeable future, may be detained for additional periods of up to six months only if the release of the alien will threaten the national security of the United States or the safety of the community or any person.
So... not forever? or maybe yes forever? While the section is titled "limitation on indefinite detention", it doesn't actually provide any such limitation except the need to extend the detention every six months, if the government is so inclined.