Secure Coding Practice Guidelines

UC Berkeley security policy mandates compliance with Minimum Security Standard for Electronic Information for devices handling covered data. The recommendations below are provided as optional guidance for application software security requirements.

Requirement

Resource Proprietors and Resource Custodians must ensure that secure coding practices, including security training and reviews, are incorporated into each phase of the software development life cycle.

Description of Risk

Unsafe coding practices result in costly vulnerabilities in application software that leads to the theft of sensitive data.

Recommendations

For applications to be designed and implemented with proper security requirements, secure coding practices and a focus on security risks must be integrated into day-to-day operations and the development processes. Application developers must complete secure coding requirements regardless of the device used for programming.

Application Security Training

A critical first step to develop a secure application is an effective training plan that allows developers to learn important secure coding principles and how they can be applied. Compliance with this control is assessed through Application Security Testing Program (required by MSSEI 6.2), which includes testing for secure coding principles described in OWASP Secure Coding Guidelines:

  1. Input Validation
  2. Output Encoding
  3. Authentication and Password Management (includes secure handling of credentials by external services/scripts)
  4. Session Management
  5. Access Control
  6. Cryptographic Practices
  7. Error Handling and Logging
  8. Data Protection
  9. Communication Security
  10. System Configuration
  11. Database Security
  12. File Management
  13. Memory Management
  14. General Coding Practices

While OWASP (Open Web Application Security Project) specifically references web applications, the secure coding principles outlined above should be applied to non-web applications as well. Please refer to OWASP Secure Coding Guidelines to see a more detailed description of each secure coding principle. OWASP also runs a Faux Bank demo site that shows the top 10 vulnerabilities along with blog posts explaining the intricacies of each vulnerability.

Listed below are examples of training courses that can be used to gain proficiency in secure coding principles: