WIP: Secure software development life-cycle

This document is a work in progres

This document present information that is not yet finalized and still under discussion.

This wiki page is a place for the GNU Toolchain to discuss the issues around current hosting from Sourceware, the GNU Project and the hosting from CTI. The goal of this page is to gather broader consensus and to consider approaches whose outcome improves security for the projects.

What is being suggested and why?

We suggest that the GNU Toolchain implement, using FOSS, the most important secure development best practices as expected by our users, developers, and the FOSS software ecosystem at large.

The GNU Toolchain, particularly gcc, binutils, glibc and gdb form the basis of the lowest-level tooling and are used to build many downstream binaries, either directly by users or indirectly by using pre-built binaries usually provided by a distribution. These projects therefore have a significant impact on the security of many other projects.

Upstream software projects present a target for malicious attackers of a variety of backgrounds.

The GNU Toolchain should show the rest of the world that we take security seriously and that we are following secure development best practices.

How do we do that?

There are many concrete practices, standards, and government requirements around secure development that we can follow to show our community and ecosystem that we take secure development and security seriously.

We can choose to implement the most relevant of these requirements with FOSS, or we can claim that none of these requirements apply to our projects.

The choice to show that we can implement security requirements with FOSS is a bold choice and is about proving that FOSS can be used in any environment. The choice to show that we meet these standards is about showing that the FOSS development model fosters much better solutions than closed source solutions or processes that cannot be audited. This choice also shows that user freedom and security can both be maintained.

There are many different standards or frameworks that we could choose to review and draw from in order to show the world that we take secure development seriously.

Such standards include (but are not limited to):

Across all of these standards the simplest and least prescriptive is that issued by NIST and it provides a good framework upon which to build our own project policies and guidelines.

The 4 practices we will discuss are aligned with the recommendations in NIST's SP 800-218's top-level practices:

  1. Identify, document, communicate, and implement the security requirements of the GNU Toolchain development process, including infrastructure requirements (PO)
  2. Protect, verify, and archive software produced using the GNU Toolchain infrastructure (PS)
  3. Produce, review and test the GNU Toolchain using secure and state of the art infrastructure (PW)
  4. Identify, confirm, and respond to vulnerabilities in the GNU Toolchain using services provided by robust and available infrastructure (RV)

The security of the development systems for the projects has specifically to do with threat models, the services we use, and what we wish to protect against and at what cost. The security of these systems must be implemented using FOSS, and must provide developers the freedom to implement these or other policies on their own systems if they so choose.

We should be able to show anyone who asks what our requirements are for our infrastructure, how we meet them, monitor them, and how they support us in developing secure and state of the art software in the GNU Toolchain.

The security of the project code itself is up to the developers and the project to improve, but it is something that we can track and improve by looking at specific threat models against our development practices. The infrastructure can support this by supporting models of CI and CD testing, or particular workflows like merge requests.

The availability of the development systems directly impacts the projects ability to respond to threats in a timely manner, put out source releases, respond to CVE requests etc, and is an important part of ecosystem security. While this could be lumped into "security of the development systems" it is a good idea to split this out, because you can have good security, but degraded services to the point they don't meet your needs.

Lastly, and always looming is the public perception of the projects, and how we present ourselves to the broader FOSS development community, and if we can be trusted by our users to form the basis of the larger software supply chain. This has to do with adopting security best practices ahead of when they are strictly required by users, companies, governments or other downstream uses.

The existing infrastructure at Sourceware, the GNU Project, or any new infrastructure must be able to meet and grow with the current and future best practices.

High level overview

Practice

Task

Prepare the GNU Toolchain packages and their policies (PO, page 5)

Identify, document, and implement security best practices for the GNU Toolchain.

Protect the GNU Toolchain software (PS, page 9)

Implement, support, and maintain the protections required to avoid unauthorized access or tampering of GNU Toolchain sources.

Produce secure GNU Toolchain releases (PW, page 11)

Identify, and document the processes by which the GNU Toolchain produces secure software, and how it addresses remaining risks.

Respond to vulnerabilities in the GNU Toolchain (RV, page 16)

Identify, confirm, and remediate vulnerabilities in the GNU Toolcahin.

Not all of these tasks have aspects that carry requirements for either Sourceware or CTI, but many of them do and touch on requirements. We expand on each section and the impact it might have on service providers. Likewise we define the glibc policies that relate to these requirements in the related document: Secure Software Development for the GNU C Library

What follows is a review of the four high-level practices but discussed for the whole of the GNU Toolchain. We start by reviewing the toolchain at the high-level to see if there are any requirements that appear for lower-level components. Eventually we'll cascade down any requirements to the components if a toolchain as-a-whole would have such requirements e.g. review of security related defaults.

Prepare the GNU Toolchain (PO)

Identify, document, communicate, and implement the security requirements of the GNU Toolchain development process, including infrastructure requirements (PO)

Preparing can be broken down into the following smaller tasks.

Tasks/Service

CTI

Sourceware

GNU Savannah

Define security requirements for development (PO.1, page 5).

Yearly review. Service related Critical or Major CVE review. Implementation must meet requirements.

Likewise.

Likewise.

Define and implement roles and responsibilities for the project (PO.2, page 6).

Roles must be defined in the implementation.

Likewise.

Likewise.

Implement and maintain supporting security tooling (PO.3, page 7).

Implementation must be operated by service provider.

Likewise.

Likewise.

Define and implement software security checks (PO.4, page 8).

Security checks must be run by service provider.

Likewise.

Likewise.

Implement and maintain secure environments for software development (PO.5, page 8).

Service provider must continuously check environments.

Likewise.

Likewise.

Define security requirements for development (PO.1)

The GNU Toolchain projects must sit down and define their security requirements for software that is used, and software that is developed.

The GNU Toolchain projects must review and update these documents, preferable at least yearly, to determine if anything needs to be updated or changed. During this process of review the service provider should also be included in the update. Changes to the security requirements can have cascading impact on the service provider. Timelines for updates, their cost, and implementation need to be communicated early and with the service provider.

A process for requesting exceptions should be defined and exceptions should also be reviewed annually or when external or internal security reviews warrant.

The GNU Toolchain projects should pay particular attention to direct and indirect dependencies like python, gzip, libidna, libffi, address sanitizers, gnulib etc. and be able to communicate security requirements with the other communities that create that software and discuss requirements. For example it should be reviewed that all bundled projects also have a security policy e.g. libffi in gcc. If other FOSS software cannot meet these requirements then exceptions should be filed and reviewed following the exception process.

If a major security incident occurs, say a Major or Critical CVE, then the security requirements should be reviewed in order to determine if any changes should be made. The idea is to carry out a review more frequently than once a year if there is a security incident that warrants such a review.

Update to the security policy should be discussed with the development community and consensus gathered.

The project stewards (GNU Maintainers) are responsible for this activity, but can delegate this to a security team for review.

Define and implement roles and responsibilities for the project (PO.2)

The GNU Toolchain projects should define and implement roles and responsibilities beyond those defined the GNU Maintainers guide e.g. GNU Maintainer, developer, uploader.

The roles and responsibilities should be reviewed annually and updated if some roles are no longer needed, or if new roles should be created.

A security role should be present in the roles and integrated into the development process to support security-related activities.

Documentation and training for the roles should be provided.

Engage with the GNU Project to ensure a commitment to secure development practice, and work to update the GNU Maintainer guide with security best practices.

Implement and maintain supporting security tooling (PO.3)

The GNU Toolchain projects should specific which tooling should be run and why e.g. pre-commit CI for build reproducibility checking vs. attacker injected artifacts.

The projects should automate, as much as possible, the use of security tooling that is being used to mitigate specific risks.

Create records of the automation that was run as part of the process for future review.

All automation should have clearly identified owners and maintainers.

Define and implement software security checks (PO.4)

The GNU Toolchain projects should define specific software security checks that they will run throughout the software development lifecycle.

The software security checks should be recorded and the results reviewed continuously as part of PO.3 above.

Implement and maintain secure environments for software development (PO.5)

The GNU Toolchain projects should have recommendations for how to secure development end points such that they are kept secure from internal and external threats.

This includes separating and protecting each environment used in development e.g. git servers, bugzilla etc.

This includes hardening development end points e.g. developers not running EOL distributions.

Protect the GNU Toolchain software (PS)

Protect, verify, and archive software produced using the provided infrastructure (PS)

Tasks/Service

CTI

Sourceware

GNU Savannah

Protect code from unauthorized access and tampering (PS.1, page 9)

Allow signing of a release, storage, and limited write access.

Likewise.

Likewise.

Provide mechanisms for verifying software release integrity (PS.2, page 10)

Allow verification of release with transparency logs

Likewise.

Likewise.

Archive and protect each software release (PS.3, page 10)

Archive each release and protect them from loss.

Likewise.

Likewise.

Protect code from unauthorized access and tampering (PS.1)

The GNU Toolchain projects should implement mechanisms that prevent unauthorized changes to code, particularly those that would circumvent security.

This includes establishing more rigorous account closure policies where accounts have been inactive for a period of time.

It is recommended that accounts be deactivated due to inactivity after 2 major version release cycles for the project.

It is recommended that account deactivation include a minimum of 3 notifications before deactivation.

Reactivation of the account should require a verification process implemented by the project.

Provide mechanisms for verifying software release integrity (PS.2)

The GNU Toolchain projects should implement a mechanism that allows anyone downloading sources to verify that they have not been tampered.

This has generally been provided by GPG signatures by package maintainers or uploaders.

Webs of trust should be established following best practices for GPG usage.

This includes expanding the web of trust via common GNU Toolchain conferences like the GNU Tools Cauldron.

Archive and protect each software release (PS.3)

The GNU Toolchain should preserve older releases for download in order to help future developer analyze and eliminate vulnerabilities discovered in existing releases.

Time-based snapshots of source control is a useful mechanism to enable safeguarding of sources for vulnerability identification and analysis.

Produce secure GNU Toolchain releases (PW)

Produce, review and test the GNU Toolchain using secure and state of the art infrastructure (PW)

Tasks/Service

CTI

Sourceware

GNU Savannah

Design software to meet security requirements and mitigate security risks (PW.1, page 11)

NA

Likewise.

Likewise.

Review secure software design frequently (PW.2, page 12)

NA

Likewise.

Likewise.

Verify third-party sofware (PW.3, page 12)

Moved to PO.1 and PW.4.

Likewise.

Likewise.

Reuse existing software (PW.4, page 12)

NA

Likewise.

Likewise.

Following secure coding practices (PW.5, page 13)

NA

Likewise.

Likewise.

Configure the toolchain to improve executable security (PW.6, page 14)

NA

Likewise.

Likewise.

Review and audit code for security defects (PW.7, page 14)

NA

Likewise.

Likewise.

Test code to identify vulnerabilities (PW.8, page 15)

NA

Likewise.

Likewise.

Secure by default settings (PW.9, page 16)

NA

Likewise.

Likewise.

Design software to meet security requirements and mitigate security risks (PW.1)

The GNU Toolchain should evaluate what security risks it is likely to face during operation e.g. compiling, linking, assembling, and running.

The security risks should be addressed during design and implementation e.g. turn on -Werror and fix warnings.

Review secure software design frequently (PW.2)

The GNU Toolchain should review security risks by having someone not involved in the design review the documented risks.

Verify third-party sofware (PW.3)

Moved to PO.1.3 and PW.4.4.

Reuse existing software (PW.4)

The GNU Toolchain should use existing well-secured sofware e.g. mpfr, mpc, libffi, etc.

Following secure coding practices (PW.5)

The GNU Toolchain should be monitoring and decreasing the number of vulnerabilities in the toolchain by following appropriate secure coding practices.

This includes carrying out proper peer review of source code and where required doing one-human review.

Configure the toolchain to improve executable security (PW.6)

The GNU Toolchain should review default compiler, assembler, linker, and runtime options to reduce the number of security vulnerabilities.

At least on an annual basis the toolchain should review defaults for all the tools in order to improve the default security posture e.g. default to PIE, default to static PIE, etc.

Review and audit code for security defects (PW.7)

The GNU Toolchain should review and audit code, preferrably with automated methods, to detect and correct security defects before release.

Test code to identify vulnerabilities (PW.8)

The GNU Toolchain should test some indicative set of binaries produced in the default configuration e.g. build and test the compiler, libraries, and utilities.

Secure by default settings (PW.9)

The defaults that the GNU Toolchain is configured with, either for building itself, or applications, should be secure by default. The secure by default settings should balance performance, security, and cost to developers and end users.

Respond to vulnerabilities in the GNU Toolchain (RV)

Identify, confirm, and respond to vulnerabilities in the GNU Toolchain using services provided by highly available infrastructure (RV)

Tasks/Service

CTI

Sourceware

GNU Savannah

Continuously identify and confirm vulnerabilities (RV.1, page 16)

NA

Likewise.

Likewise.

Asses, prioritize and remediate vulnerabilities (RV.2, page 17)

NA

Likewise.

Likewise.

Identify vulnerability root causes (RV.3, page 18)

NA

Likewise.

Likewise.

Continuously identify and confirm vulnerabilities (RV.1)

The GNU Toolchain should have a program for identifying and confirming vulnerabilities. The project should have processes in place to address and remediate the vulnerabilities with the roles required to support this practice.

Asses, prioritize and remediate vulnerabilities (RV.2)

The GNU Toolchain should assess and review reported vulnerabilities. The project, after assessing, should plan and implement a risk response for the vulnerability.

Identify vulnerability root causes (RV.3)

The GNU Toolchain should determine the root cause of a vulnerability. The intent here is to identify patterns in the root causes and attempt to address deficiencies with design changes, either in code or in the process. The secure software development lifecycle should be reviewd and updated if appropriate to remove a class of vulnerabilities.

Project specific documents

Secure software development life-cycle for glibc

None: SSDLC (last edited 2026-01-20 22:04:15 by CarlosODonell)