Task Group Six was an interagency working group for members of the National Security Council on the problem of intelligence compromises. As a result of its study, it made a number of recommendations to improve security and reduce the likelihood of insider threats - changing the way the intelligence agencies did business by putting a natural limit on the scope of their activities. If these policies had been pursued, it’s unlikely that Snowden would have had the justification or the ability to leak the materials he did. Instead, the recommendations that would have seen an actual shift in the status quo were ignored.
In 1976 and again in 1977, the Justice Department decided not to prosecute anyone for the CIA’s illegal surveillance and mail openings. The report issued in 1977 reveals the Justice Department’s highly flawed reasons, including claims that prosecution would not serve to prevent such questionable or outright illegal surveillance from happening again - ironically setting the stage for modern surveillance programs.