Secure Coding Best Practices has been an area of emphasis for our department this year. World Class Security will be one of Information Systems’ Key Initiatives for 2016. One of the reasons we need to take this seriously is that more than 90% of all attacks to company systems are coming through the web application layer (source: https://www.securestate.com/services/web-application-security-grey-box).
Every three years OWASP (Open Web Application Security Project) comes out with a list of the Top Ten most critical web application security risks. As developers we need to be familiar with these risks. There are actually 695 different web application vulnerabilities, but safeguards against the top 10 are usually effective against most of the others.
Here is a list of some Secure Coding Best Practices –
- Input Validation
- Whitelisting
- Blacklisting
- HTML encoding / escaping.
- Use Parameterized Queries.
- Prepared Statements
- Use CSRF Tokens.
- Protect your session with HTTPS.
- Encrypt sensitive data.
- At rest
- In transit
- Salt and hash all passwords
- Always check for proper access rights
- Data
- Function calls
- Do not expose primary keys and IDs.
- Classify your data.
- Know your asset. What are you trying to protect?
- Secure your framework.
- Best way to secure your application.
- Makes security easy for the developers.
- Use standard tools and code libraries.
- Update them regularly
- Error handling
- Fail securely
- Avoid security by obscurity.
- There are many ways to find what seems to be hidden.
- Defense in depth.
- Least privilege
- Event logging
- Prevention and detection
- Know the attack surface of your application.
- Implement security throughout the SDLC
- Involve your IT Security team early.
- Perform Vulnerability Assessments (VA).
- Harden your server
- Close unused services
- Patch your application server
- Don’t forget your development environment
- Trust no one!
- Don’t trust the infrastructure
- Don’t trust services from external systems
- Don’t trust users’ input
No comments:
Post a Comment