Decreasingly the case, and we might be at the point I can say "poorly architected" if that's the case. A random 19 year old developer in the military with access to the secrets would be a big security hole too.
That's what we should be comparing with regards to open-source vs not open-source - in either case access to weaponry would of course be heavily gated.
Some of the other arguments you make here are no different than conventional arguments against open-source:
> the real code would still be private
Precisely the point, get the crowd to optimize the low-risk parts, build communities around those libraries and frameworks and recruit from it
> opponents might catch up
To remain an industry leader it's actually better to get everyone playing your game rather than trying to compete and stay ahead in a wild west scenario. You want to capture it really, so you can control it and be the leader in it. Open-source is one great way to do that (browser vendors come to mind).