Rep. Ro Khanna (D-Calif.), a co-chairman for Sen. Bernie Sanders's (I-Vt.) presidential campaign, spoke out Tuesday against charges by the Brazilian government against American journalist Glenn Greenwald, saying the country illustrated the need for Espionage Act reform in the U.S.

"Prosecuting reporters for doing their work will have chilling effect on journalism across the world," Khanna tweeted Tuesday. "I'm crafting legislation to protect journalists from being prosecuted over their published work."

Khanna wrote he is currently developing legislation to amend the law, which was the basis for federal charges against WikiLeaks founder Julian Assange to ensure it cannot be used to indict journalists.

"The Trump administration charging Assange opened up a chilling effect on journalism," Khanna told CBS News.

"If you are the recipient of information that is sensitive and you haven't been involved in assisting the collection of information, but you're just receiving that information from a source and publishing it for journalistic purposes - then you can't be prosecuted."

Khanna said that he hopes to work with Rep. Justin Amash (I-Mich.), a co-founder of the House Freedom Caucus who was later removed from it after leaving the Republican Party, as well as conservative members he believes may be similarly concerned about the potential for government overreach.

The eventual bill, he said, "will be a major protection for journalists' ability to work on these critical issues."

Greenwald, who lives in Brazil, has been accused by prosecutors of cyber crimes in relation to his publication of private phone conversations involving high-level Brazilian officials. He has denied all charges and called them "an obvious attempt to attack a free press" in retaliation for his reporting on President Jair Bolsonaro's government.