Think of all the ways you might be denied a security clearance from the United States government. Maybe you’ve racked up so much medical debt that the government worries you might be tempted to take up an illegal side hustle. Maybe you got addicted to online gambling. Maybe you’re a too-frequent user of marijuana, cocaine, Adderall, ecstasy and hallucinogenic mushrooms. Some of the reasons for denial are so broad—such as having family or business contacts in a foreign country—that the paths to losing a security clearance are probably as numerous as the four million people who currently have one.

Of all the possible reasons to lose a clearance, though, one should strike us as particularly suspect: You criticized the President. A security clearance is a prerequisite to a wide variety of federal government, military and contractor jobs, and the notion that you might be frozen out of such work because you disagree with the administration’s policies sounds like the worst form of viewpoint discrimination, the practice of elevating or suppressing speakers based on the content of their speech—a practice that the First Amendment has traditionally looked upon with scorn.

And yet, according to White House Press Secretary Sarah Huckabee Sanders, President Donald Trump appears to be contemplating precisely such a move. Sanders announced Monday that the president is weighing revoking the clearances of a number of Obama-era national security officials, including former CIA Director John Brennan, former FBI Director James Comey and former Director of National Intelligence James Clapper, “because they politicized and in some cases monetized their public service and security clearances.” Among the objectionable politicizing these individuals had engaged in, Sanders said, were their “baseless accusations of improper contact with Russia or being influenced by Russia against the president.”

A plausible reading of her comments is that they threaten retaliation for criticizing the president (as well, perhaps, as send a message to lower-ranking officials about staying in line). The question thus arises: If Trump made good on his threat, could his critics sue?

It’s an open question. That’s because the courts, ever since the Supreme Court’s 1988 decision in Department of Navy v. Egan, have shown extreme deference to the executive branch when it comes to the issuance of security clearances. Egan involved a challenge from a Navy employee who was discharged after being denied a clearance over concerns about his criminal history and a past drinking problem. The Court, en route to resolving the challenge, recognized that the authority to issue clearances comes primarily from the Constitution’s Article II investment of power in the president as the “Commander in Chief of the Army and Navy of the United States,” and it exists independently of any explicit grant of power from Congress. Since the Second World War, presidents have delegated the authority to protect sensitive information to the heads of civilian agencies like the CIA and NSA. (Among the documents governing the current procedure for granting and denying security clearances are Executive Order 12968, adopted in 1995 and subsequently amended, and executive branch guidelines adopted by the Obama administration shortly before Trump’s inauguration.)

In Egan, the Court addressed what it described as only a “narrow question” about whether the Merit Systems Protection Board, the agency that protects civil servants from arbitrary dismissal, had statutory authority to review the substance of the executive’s decision to revoke a security clearance. But in deciding that the Board lacked the requisite authority, the Court also included expansive dicta about deference to the executive on matters of national security. “[N]o one has a ‘right’ to a security clearance,” the Court wrote, and the “protection of classified information must be committed to the broad discretion of the agency responsible.” Moreover, the granting of a security clearance is a “sensitive and inherently discretionary judgment call,” and “it is not reasonably possible for an outside nonexpert body to review the substance of such a judgment.”

Lower courts after Egan have consistently concluded that the merits of security clearance decisions, which are the product of a granting officer’s expert assessment of trustworthiness and risk, are fully insulated from judicial review. That conclusion seems consistent with Egan, which involved the kind of judgment call about potential risk that a court might be reluctant to second-guess: a laborer lost out on an opportunity to work on a nuclear submarine based on old convictions for assault and felony gun possession and an admitted drinking problem. But Egan did not address the possibility that the government might make its decision based on a constitutionally impermissible reason, such as, say, the applicant’s race or religion. In such a case, would the courts really have nothing to say about whether the applicant’s rights were violated?

The Supreme Court faced just such a question in Webster v. Doe, a decision that, surprisingly enough, it handed down only four months after Egan. Webster didn’t involve a security clearance decision, but it involved something remarkably similar: The CIA director terminated a “covert electronics technician” on the grounds that he posed a threat to security. The director’s reason, however, was that the technician was gay. Almost immediately after he’d voluntarily told a security officer about his sexual orientation, the agency put him on administrative leave, opened an investigation, and ultimately concluded his “homosexuality presented a security threat.”

A federal statute committed firing decisions to the CIA director’s discretion, a fact which led the Webster Court to dismiss the technician’s claims arising under the Administrative Procedures Act. But, the Court held, the statute didn’t bar his claims that his termination violated his constitutional rights to due process, equal protection and privacy. The Court found no basis in the statute to conclude that Congress meant to preclude “colorable constitutional claims” arising from the agency’s actions. To find otherwise, the Court wrote, would have raised a “serious constitutional question” about Congress’s ability to insulate constitutional violations from judicial review.

The courts of appeals, following Webster, have generally embraced the distinction that can be read into these cases: that while the executive receives substantial deference on its expert assessment of national security risks, the courts remain open to credible claims that the executive made its decision on a constitutionally impermissible basis. As the Third Circuit put it, in the 1996 decision in Stehney v. Perry, “not all claims arising from security clearance revocations violate separation of powers or involve political questions.” Meanwhile, yesterday’s concurrence from Judge Gregory Katsas in Palmieri v. U.S. suggests the D.C. Circuit continues to be alert to the tension between Egan and Webster, as does Judge David Tatel’s concurrence in the 2017 decision in Gill v. United States Department of Justice, which provides a particularly thorough run-through of decisions limiting Egan’s reach in light of Webster. (H/t to Deepak Gupta for Monday’s tweet flagging Gill.)

So where does that leave the erstwhile clearance-holders who served under previous administrations? There’s a strong argument to be made that at least some constitutional challenges to the revocation of security clearances would be judicially reviewable. And there are features of Trump’s revocation threat that make judicial review more plausible, although other features present potential hurdles.

On the one hand, we have Trump’s press secretary explicitly saying that the reason for revoking these individuals’ clearances (apart from the fact that some of them “monetized” their status) is that they criticized the president, and particularly his dealings with Russia. That might save a potential challenge from failure for lack of evidence of impermissible motive, a frequent stumbling block for claims of unconstitutional discrimination. (In Gill, the D.C. Circuit dismissed one of the plaintiff’s equal protection arguments because the reviewing committee’s decision, on the surface, showed no evidence of disfavoring his naturalized family members.) Given this evidence, there’s a real question whether a challenge to Trump’s threatened revocations would even engage the concerns that motivated Egan, which had to do with avoiding picking apart the agency’s decision-making process in the grant or denial of a clearance.

On the other hand, it’s not clear how a court would view a decision to revoke a security clearance based on viewpoint, since at least some viewpoints that would be constitutionally protected in other contexts seem relevant to the standards for security clearance determination. Executive Order 12968, after all, instructs agencies to grant clearances “only to employees . . . whose personal and professional history affirmatively indicates loyalty to the United States, strength of character, trustworthiness, honesty, reliability, discretion, and sound judgment, as well as freedom from conflicting allegiances and potential for coercion.” Those terms— “reliability,” “sound judgment”—undeniably invite substantial agency discretion.

Still, some viewpoints seem obviously impermissible as a basis for denying a clearance. Could an administration revoke a clearance because an official was a Republican or Democrat? Because she didn’t vote for the president? It’s hard to imagine courts tolerating a world where four million Americans with security clearances could lose them simply for speaking their minds.

Photo by Joe Raedle/Getty Images