A leading lawmaker on cybersecurity issues accused the tech giant of negligence that enabled the spying campaign.