Hacking, as in modifying the code? Yes, closing the source would be a barrier for modifications in general. So doing that will also hinder improvement.
If you mean as in adding "security", no, that would actually reduce security (confidentiality, availability, integrity) by preventing proper peer review and coordinated development. That is really an old topic that was done and settled back in the 1990s. So were other forms of security through obscurity.
What is your real reason for asking it now?
Confidentiality, availability, and integrity are not a destination, but a continuous process. That's cliche, but in general keeping it simple as possible, removing compex and / or extraneous parts will go a long way in that direction. Also, coding style matters. Clean, easy-to-read code will get you further in that direction, too. An additional reason for requiring clean, easy-to-read code is that code is read many more times than it is written or even modified so an investment in writting it cearly in the beginning will pay for itself many times over during the life of the code base.