The scope and sophistication of recent cyberattacks on American government, business and personal accounts are chilling. The latest, a breach of federal personnel records that could affect more than four million current and former employees, is a reminder that enhancing the nation’s cyberdefenses has to be an urgent priority.

Yet, in tailoring new programs and policies to fight hackers, members of Congress and the Obama administration should not allow a siege mentality to take hold.

The disclosures by Edward Snowden about the abuses of the National Security Agency have led to important reforms that have sought to prevent the government from collecting information about Americans in unlawful ways and to strengthen privacy safeguards. But that process still has a long way to go, and it would be unwise to let the rising threat of cyberattacks snarl it or roll it back.

This week, The New York Times and ProPublica, relying on documents leaked by Mr. Snowden, reported that the N.S.A. and the F.B.I. have cooperated closely on cyberthreat investigations in recent years.