Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One of the lessons I learned early on regarding security was to program as if I don't trust my code to be secure. I always ensure that something else is enforcing security to the extent possible. In some cases I take the "run with the least possible privileges" to an extreme, and grant my application no privileges to crucial resources absent user-supplied credentials.

The advantage of this approach is that even otherwise ordinary security wholes become hard to exploit in useful ways. For example, the set of interesting attacks you can pull off from SQL injection when the SQL permissions are tied to your application login are quite a bit less than they are ordinarily and while you can still do nasty things, the attacks tend to require greater internal knowledge of the database, and the scope of vulnerability is narrowed. Get rid of string interpolation in your queries to the extent possible and another issue goes away.

Be paranoid about security and that will serve you well.....

So when I read that a framework is insecure by default, I naturally suppose that I have good reason to stay away from it.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: