Like a city whose walls are broken down is a man who lacks self-control.
|Proverbs 25:28 (NIV)|
Some program designs are relatively easy to secure; others are practically impossible. If you want a secure application, you'll need to follow good security design principles. In particular, you should minimize the privileges your program (and its parts) have, so that the inevitable mistakes are much less likely to become security vulnerabilities.