Secure Software Development Standard
Secure Software Development Standard
ITS
Systemwide CISO Office
Systemwide IT Policy
Table of Contents
1 Background and Purpose.......................................................................................................................
3
2 Scope ..................................................................................................................................................... 3
3 Definitions ............................................................................................................................................. 4
4 Requirements for Secure Software Development.................................................................................
4
4.1 Software Development Process......................................................................................................
4
4.2 Input Validation .............................................................................................................................. 5
4.3 Exception and Error Handling ......................................................................................................... 5
4.4 Cross Site Scripting (XSS) and Invalidated Redirects/Forwards ...................................................... 6
4.5 Insecure Direct Object References ................................................................................................. 6
4.6 Logging............................................................................................................................................ 6
4.7 TLS and Secure APIs ........................................................................................................................ 6
4.8 Credentials/Passphrases................................................................................................................. 7
4.9 Session and Logout ......................................................................................................................... 7
4.10 Federated Authentication / SAML / Shibboleth .............................................................................. 7
4.11 File Management ............................................................................................................................ 8
4.12 Secure Configuration....................................................................................................................... 8
4.13 Documentation ............................................................................................................................... 8
4.14 Version Control ............................................................................................................................... 8
5 References ............................................................................................................................................. 9
6 Standards............................................................................................................................................... 9
7 UC Policy ................................................................................................................................................ 9
This Standard defines the requirements for secure software development. These
projects are sometimes called “custom,” “in-house” or “open-source” software
applications.
This Standard must be used in conjunction with UC’s information security policy, BFB-IS-
3 Electronic Information Security.
Full-featured and robust programing languages and development platforms can weaken
our cyber defense if implemented incorrectly. The risk is so common that almost every
penetration testing report contains a chapter on exploiting “application weaknesses.”
Proper software development is required as part of the cyber risk management
program.
Applications, regardless of where they are hosted or where they run, are often not
secure by default and require specific steps to achieve a secure outcome. Many website
samples and vendor materials focus on getting applications to work with a minimum
investment of time and without accounting for ongoing support costs. Even free open-
source software can pose significant or important cyber risks. It is thus important to
evaluate open-source software properly, too.
Attackers can use poorly constructed applications to compromise UC Institutional
Information and/or IT Resources or make it possible to use UC IT Resources to do harm
to others.
As outlined in IS-3, security is part of the entire system lifecycle. The best time to start
applying good security principles is before development when requirements are created
as part of an overall security architecture.
There are many resources available to help select, design, architect, implement and test
software and applications to ensure that they are secure. This Standard establishes a
minimum set of practices to manage cyber risk. UISLs and IT Workforce Members should
also consider reducing cyber risk through:
● Software and IT Resource architectures.
● Data minimization (e.g., collecting only the data needed, focusing on a specific
purpose).
● Interface design and dependency management.
2 Scope
This Standard applies to all Locations. This Standard applies to all new software
developed by or for the University of California as a network accessible production
application:
● For business and administrative purposes;
● When contracts or grants set forth security requirements or concerns;
● When privacy or confidentiality is involved; and
● When there are regulatory requirements that include application security.
Note: This Standard does not apply to research computing; academic experiments; or
student projects not otherwise covered above, provided there is no processing, storing or
transmitting of Institutional Information classified at Protection Level 3 or higher.
None
4 Requirements for Secure Software Development
All software benefits from its developer’s adherence to secure software development
practices regardless of the Protection Level (PL) or Availability Level (AL) classification
associated with the Institutional Information processed, stored or transmitted.
Software does not exist in a vacuum (e.g., it is often collocated with other applications);
a weakness in one application can become an attack vector to gain access to other
applications or data. Secure practices for all software development are a vital part of
adequate cyber risk management.
IT Workforce Members must follow secure software development practices during the
entire software development lifecycle and implement controls appropriately. The
layering of security controls helps prevent or detect breach attempts and can reduce the
time required to detect and respond to attackers.
Even applications that process only Institutional Information classified at Protection
Level 1 need to be secure so they are not exploited to attack users with malware
downloads or redirects to malicious sites. Attackers can use vulnerabilities in these
applications to gain access to internal IT Resources with a higher Protection Level.
4.1 Software Development Process
Secure software development includes integrating security in different phases of the
software development lifecycle (SDLC), such as requirements, design, implementation
and testing. The basic task of security requirement engineering is to identify and
document actions needed for developing secure software systems. Security elements of
the SDLC must include:
• Planning to meet security requirements and goals.
• Threat modeling.
• Design to include security and privacy concerns.
• System architecture (e.g., web, applications, user interfaces, programmatic
interfaces, file import/export, reports, databases).
• Documentation.
• Change management (See IS-3, III).
• Testing, including creating test plans, reviewing test results and confirming fixes
and patches.
• Secure deployment practices and separation of duties.
Regarding code review, Units developing software that will process, store or transmit
Institutional Information classified at Protection Level 3 or higher or Availability Level 3
or higher must:
● Separate public and private application APIs and configure CORS (Cross Origin
Resource Sharing) headers to restrict invocation rights.
Note: IT Workforce Members must not write their own encryption code because it is too
easy to make critical errors. Training does not exempt IT Workforce Members from this
warning. This applies to everyone: DO NOT WRITE YOUR OWN CRYPTO. The problem of
encrypting data has already been solved and vetted by the security community (e.g., FIPS
140-2 validated ciphers). See references below.
4.8 Credentials/Passphrases
IT Workforce Members developing software must:
● Never store user passphrases.
● Protect service account credentials with established tools and techniques.
● Never hardcode credentials.
● Implement lockout after 5 failed authentication attempts.
● Use secure protocols for credential or other secret exchanges (e.g., TLS 1.2 or
later).
4.9 Session and Logout
IT Workforce Members developing software must:
● Ensure that session timeout is implemented.
● Make sure session tokens are random and long (GUID long).
● Change (delete old and create new) tokens at each logon and each privilege
escalation.
● Delete, remove and invalidate tokens on logout.
● Use TLS 1.2 or later for all session tokens and cookies.
● Provide a logout function.
● Prominently display the logout function throughout the application.
● Properly close records, delete temporary objects and close operations on the
server:
o As part of the logout process.
o After a set period of inactivity (e.g., less than one hour).
o After a browser window close.
4.10 Federated Authentication / SAML / Shibboleth
IT Workforce Members developing software must use the Location-approved, single
sign-on, SAML-based authentication or the CISO-approved method for authenticating
users.
They must also:
● Assign permissions to user groups (not individual users).
● Assign users to user groups.
● Ensure the application has a user group with no/minimal privileges assigned.
● Assign or default new users to the user group with no/minimal privileges and
make assignment to a group explicit.
● Check/recheck authorization at the next logical operation (e.g., for web
applications at the next page request).
● Log all actions that grant users or groups permissions or rights.
• Deploy test and production applications from the version control system or
repository.
• Tag/label versions so that they can be extracted at a later time.
• Configure the version control system or repository to prevent and detect
unauthorized changes.
5 References
Howard, M. and LeBlanc, D. (2004). Writing Secure Code 2, Practical Strategies and
Proven Techniques for Building Secure Applications in a Networked World (Developer
Best Practices). Redmond, Washington: Microsoft Press.
OWASP Top 10:
https://www.owasp.org/index.php/Top_10_2017-Top_10
OWASP Secure Coding Guidelines:
https://www.owasp.org/images/0/08/OWASP_SCP_Quick_Reference_Guide_v2.pdf
OWASP Web.config Encryption:
https://www.owasp.org/index.php/OWASP_Backend_Security_Project_.NET_Security_P
rogramming#Web.config_Encryption
OWASP XSS (Cross Site Scripting) Prevention Cheat Sheet.
https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Shee
t
FIPS 140-2: https://csrc.nist.gov/Projects/Cryptographic-Module-Validation-
Program/Standards
Cryptographic Algorithm Validation Program:
https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/validation
NIST Special Publication 800-111, Guide to Storage Encryption Technologies for End
User Devices: https://csrc.nist.gov/publications/detail/sp/800-111/final
Developing for accessibility: http://www.ucop.edu/electronic-accessibility/standards-
and-best-practices/description-of-wcag-2.0.html
6 Standards
IT Security Committee – UC Minimum Security Standard
IT Security Committee – UC Account and Authentication Management Standard
IT- Security Committee – UC Logging Standard
EAA-006 Federated authentication protocols (Cross-campus Applications)
EAA-007 User Identification Attributes
EAA-033 Password Complexity and Online Guessing Resistance Standard
EAA-061 Secure Data Transfer Mechanisms
EAA-065 Event Logging and Management Standard
EAA-070 HTTPS Everywhere
7 UC Policy