The Senate Judiciary Committee will take up legislation later this week to enact a new media shield law that includes revised Justice Department rules for investigations involving journalists.

Sens. Charles Schumer (D-N.Y.) said the pending legislation would codify many of the changes outlined in the updated DOJ guidelines for national security leak investigations that involve members of the media.

“The DOJ guidelines were a promising start, but this bill ensures that they can’t be changed on a whim, and goes beyond the guidelines to ensure that we balance our national security needs against the public’s right to the free flow of information,” Schumer said. “These changes make the bill stronger and should provide added momentum to get it passed.”

The proposed Free Flow of Information Act includes a provision requiring strict guidelines be met before reporters are compelled to identify their sources. The bill further requires prosecutors to prove “the public interest in compelling disclosure outweighs the public interest in gathering or disseminating news or information.”

The legislation enjoys broad bipartisan support and has been well received by the White House and Department of Justice.

“The department is pleased with the progress being made on this important media shield legislation,” said Justice spokesman Brian Fallon. “We will continue to work with lawmakers on both sides of the aisle as the bill moves forward in the Senate.”

In a strange twist, just as the Department of Justice has enthusiastically backed the shield legislation, a federal appeals court handed the Obama administration a victory by ruling that a New York Times reporter was not protected from testifying in a long-running government leak case.

The U.S. Court of Appeals from the 4th Circuit found that journalist James Risen does not have special privilege that would allow him to withhold testimony in the criminal case.

“We agree with the decision,” said a spokesman for the Justice Department. “We are examining the next steps in the prosecution of this case.”