A federal judge in Virginia has ruled that the U.S. government has the authority to seize the proceeds of Edward Snowden's book because he failed to submit his book to the CIA and National Security Agency (NSA) for pre-publication review to analyze any classified information printed within.

The ruling, by Liam O'Grady, U.S. District Judge of the Eastern District of Virginia, is a perfect encapsulation of the letter of the law and also the bizarreness of its application. Snowden's book, Permanent Record, documents his decision to blow the whistle on the NSA's secret surveillance and mass unwarranted collection of Americans' communication data. He is currently a fugitive from the Department of Justice (DOJ), living in Russia, charged with espionage, though many Americans see him as a hero.

Snowden's former work agreements with the CIA and NSA are clear that he (and any other employee) must submit the contents of books or speeches for review. There is no exception to account for him blowing the whistle on what many Americans see as misconduct. He's still supposed to submit his book for review to the very agencies whose misbehavior he was revealing. So in response to the book's publication, the DOJ sued Snowden and his publishers, demanding the money from both the book and from Snowden's public presentations.

It seems very unlikely that Permanent Record would get a fair review from the CIA and NSA but the rules don't care. O'Grady even canceled a planned hearing for verbal arguments because he said they weren't necessary. O'Grady notes in the ruling that "there is no genuine dispute of material fact publicly disclosed the type of information and materials described above in Permanent Record and his speeches…" So, he loses and the feds will get to take the money he would have made from the book, a New York Times bestseller.

Brett Max Kaufman, a senior staff attorney with the American Civil Liberties Union who helps represent Snowden, put out a statement saying, "It's farfetched to believe that the government would have reviewed Mr. Snowden's book or anything else he submitted in good faith. For that reason, Mr. Snowden preferred to risk his future royalties than to subject his experiences to improper government censorship." He also calls for reforms to an "unfair and opaque pre-publication review system affecting millions of former government employees."

Snowden's team is considering their options.

Read the ruling here. Read an excerpt from Permanent Record here.