Journalists are allowed to keep their sources secret even if the government alleges that a crime has taken place. These rules are not as clear cut as you’re implying.
No such constitutional right exists at the federal level.
> The Supreme Court decided in a five to four decision that the press did not have a Constitutional right of protection from revealing confidential information in court. The court acknowledged, however, that the government must "convincingly show a substantial relation between the information sought and a subject of overriding and compelling state interest."
Yep, and while Washington does have a shield law, the judge in this case has decided that it does not fully apply against this kind of subpoena:
> Lee said the news organizations were not protected by a Washington state shield law that under many circumstances prevents authorities from obtaining reporters’ unpublished materials.