An article written by Jeff Cogswell, published in linux.com, lists 5 best practices that can be adopted during open source development for improved security.
Let's look at five best practices for working with security in open source programming. When you write software, there's a high likelihood that you'll have to include some kind of security. Plenty of open source libraries are available to help you add security, but you have to do it right. Otherwise, you'll be asking for big trouble later, which might include your client getting featured on the national news.
Do It Yourself : This is probably the single most important rule in dealing with security. Unless you are a certified security expert with lots of experience, do not try to write your own security code . Don't do it. Period.