The Senate overwhelming approved the so-called Cybersecurity Information Sharing Act (CISA) on Tuesday. The measure would allow companies to share consumers' data with the US government in the event of security breaches or cyber attacks—all in the name of cybersecurity.

Edward Snowden, the NSA whistleblower, had declared the measure—which now goes to a conference committee between the House and Senate—a "surveillance bill." In essence, the measure provides corporate America with legal immunity when sharing data about hacks and digital breaches with the Department of Homeland Security. The DHS can then funnel that information to other agencies, including the NSA and FBI.

Senate advocates said there's nothing in the bill that requires data sharing and that personally identifying information is required to be removed by corporate America if it knows "at the time of sharing" it contains identifying information on their consumers. They say the legislation would help the government and private enterprise coordinate responses to cyber attacks. But some members of Congress don't see it that way.

"The fight to secure Americans’ private, personal data has just begun,"said Sen. Ron Wyden (D-Oregon), who voted against the measure. "Today’s vote is simply an early, flawed step in what is sure to be a long debate over how the US can best defend itself against cyber threats. As even the sponsors have acknowledged, this bill will do little to protect Americans from sophisticated hacks. At the same time, it will allow large volumes of Americans’ personal data to be unnecessarily shared with government agencies from the NSA to the FBI."

The Computer and Communications Industry Association had also blasted the bill: "CISA’s prescribed mechanism for sharing of cyber threat information does not sufficiently protect users’ privacy or appropriately limit the permissible uses of information shared with the government."

The Center for Democracy & Technology also chimed in.

"Passage of CISA is a huge step backwards for privacy rights in the United States. Now, more personal information will be shared with the NSA and with law enforcement agencies, and that information will certainly be used for purposes other than enhancing cybersecurity," said Greg Nojeim, CDT's senior counsel and director of the Freedom, Security and Technology Project.

The Retail Industry Leaders Association applauded the vote.

"Common-sense legislation that gives businesses the tools and legal protections needed to share cyber-threat indicators is a step in the right direction to thwart future attacks. We urge Congress to finish the job and get this legislation to the President’s desk as quickly as possible," the association said.

Sen. Dianne Feinstein (D-California) and Senator Richard Burr (R-North Carolina) co-sponsored the package. "This landmark bill finally better secures Americans private information from foreign hackers. American businesses and government agencies face cyber-attacks on a daily basis," Burr said.

The White House, meanwhile, supports the bill. The measure still must be reconciled with the April version that passed the House.