This page lists some resources you may find useful when considering programs which need to be hardened against exploitation by the people who use them, or the people who connect to them
The Peons' Guide to Secure System Development - a very good, and very readable, talk about programming for security
Ten Security Checks for PHP - a desciption of many of the ways in which PHP scripts (and web-pages in general) can be made more secure
Secure Programming for Linux and UNIX - Linux HOWTO document on writing secure code
Webserver Security - IBM Article on securing website scripts
Article on CGI security - server-side scripts
Filtering HTML - useful list of some javascript-injection exploits that bulletin-boards need to filter against