Secure Coding Practices Quick Ref 4
Secure Coding Practices Quick Ref 4
Project leader
Keith Turpin
Keith.n.turpin@boeing.com
OWASP
August, 2010
OWASP 2
Some Background
OWASP 3
Guide Overview
OWASP 4
Sections of the Guide
Introduction
Software Security Principles Overview
Secure Coding Practices Checklist
Links to useful resources
Glossary of important terminology
OWASP 5
Checklist Sections
Data Validation
Authentication and Password Management
Authorization and Access Management
Session Management
Sensitive Information Storage or Transmission
System Configuration Management
General Coding Practices
Database Security
File Management
Memory Management
OWASP 6
Checklist Practices
OWASP 7
Extract - Database Security
Use strongly typed parameterized queries. Parameterized queries keep the query and data
separate through the use of placeholders. The query structure is defined with place holders
and then the application specifies the contents of each placeholder.
Utilize input validation and if validation fails, do not run the database command.
Ensure that variables are strongly typed.
Escape meta characters in SQL statements.
The application should use the lowest possible level of privilege when accessing the
database.
Use secure credentials for database access.
Do not provide connection strings or credentials directly to the client. If this is unavoidable,
encrypted them.
Use stored procedures to abstract data access.
Turn off any database functionality (e.g., unnecessary stored procedures or services).
Eliminate default content.
Disable any default accounts that are not required to support business requirements.
Close the connection as soon as possible.
The application should connect to the database with different credentials for every trust
distinction (e.g., user, read-only user, guest, administrators).
OWASP 8
Using the guide
Scenario #1: Developing Guidance Documents
Coding Practices
OWASP 9
Using the guide continued
Coding Practices
OWASP 10
Using the guide continued
Scenario #3: Contracted Development
Identify security requirements to be added to outsourced
software development projects.
Include them in the RFP and Contract
RFP
Best
Contract
Software
Best
Ever
Software
Ever
OWASP 12
A Secure Development Framework
Guidance on implementing a secure software development framework
is beyond the scope of the Quick reference Guide, however the
following OWASP projects can help:
OWASP 13
Questions
OWASP 14