What would be the alternative? For a functional national security program, some aspects need to be secret from the general public in order to protect against compromise.
Judges should have to sign off on warrants to access data, and there must be a process to (at least retroactively) sue if the basis of the warrant was fraudulent or fabricated.
Further, the 'gag order' component should be temporary and of minimum necessary duration. The arrest of a target should automatically invalidate the gag order because keeping this information from the defendant is a violation of due process.