There is no security advantage in proprietary software. Anyone wishing to attack a proprietary system can use disassemblers or search the machine code to look for the same patterns they would be looking for in open source code. The security of any system is primarily dependent on how it is designed and built.