Pros of open sourcing a product:
- fewer total number of vulnerabilities
Cons of open sourcing a product:
- more publicly-known vulnerabilities
- less effort required to find new vulnerabilities
The product might be more objectively secure, with more bug reports and more fixes.
But it will be less practically secure. There will be more known vulnerabilities, and many customers can't upgrade, leaving more total vulnerable customers. And worse, now anyone on the internet can try and find new vulnerabilities for $0, while before they'd need to buy a $1,000+ piece of hardware to even get a shot at the compiled code.
The real defense against this problem is security auditing. Security engineers try to hack the device while asking a bunch of questions about SSH connections and private keys. This is the technique most companies employ, often combined with bug bounties.