

What does any of this have to do with GPL or open source licenses? Military applications all have strict validation requirements that rule out the majority of open source anyway, and your first example doesn’t even explain how the software being open source would be dangerous at all. Actually, for that matter, nor does the military example. Encryption doesn’t work because the other party doesn’t know your algorithm lol, it works because the other party doesn’t know your secret keys.
The only time I can think of from the top of my head where obscurity aids security is when secret keys are kept obscure. This isn’t even what people mean by “security through obscurity” though, so I’d actually beg someone to give an example where obscurity is actually beneficial to security and doesn’t just give a false sense of security instead.
That’s not to say everything can or should be open source, of course, just that relying on it being closed source for your application to be secure is a good way to open yourself up to attacks.