I mean, however problematic an arrangement for legal defense in this setting is, at least they must have a very high bar of acting on it, if any action could reveal too much.
Also, if the only legal defense would be that the evidence was acquired illegally, that's a pretty weak defense, especially if it was simply defined to be legal. The minor problem of damages incured despite being not guilty already existed before--a door broken to search your house will not be repaired by them either way, I don't think.
The major problem that amounts to a concpiracy theory of controling politics, influencing supreme court judgement and cetera may be conciderable, but in that case, what's a lawyer going to do about it, huh?
This is a terribly bad idea, if you consider the Curry-Howard-correspondance between proof and programm, and the constructive logic approach of proof by construction. That's a stretched metaphor, perhaps, but it's very real, considering that one often waits how things play out.
Just like wikipedia let's everyone edit, see how it turns out, and revert later--which can be messy or impossible if several legit edits were made meanwhile.
I agree and think the way to improve this is to codify into the relevant laws that:
1. If the government claims "state secrets" they have a burden of proof to demonstrate a reasonable probability of specific and tangible harm actually occurring.
2. The judge must evaluate whether the secrecy is justified using a 'balance of harms' weighting that considering the degree and probability of harm to the other party, the public and the constitution.
3. In cases where the judge determines a state secrets exception is justified, the other party may propose remedies that allow the case to proceed while mitigating the harm. The judge may appoint a special master to determine if mitigation is possible.
4. The government must demonstrate a reasonable probability that the information which would be publicly disclosed isn't already known to or assumed by the specific target(s) they are operating against.
The last point is key. It means if the justification for the state secrets exception is to preserve spying against foreign powers and/or terrorists, the govt must show that the relevant foreign powers and terrorists don't already know (or assume) the secret info anyway. For example, Russia and China certainly know that the NSA is doing stuff like Upstream 'full take' because they do it too. We also already know that terrorists already assume that every form of electronic communication can be tapped. Thus, the only people who don't know the "secret" aren't the bad guys but the general public who aren't the supposed target of this anyway (because these spying programs aren't legally supposed to be used for criminal investigation).
I think much of the time, the reason the govt wants to keep these things secret isn't to keep it from the bad guys but rather to keep the voters from finding out and pushing congress and the courts to actually do their job and stop unconstitutional programs.