EVOPEDIA

← all systems · see it in The System

Secure software development

The practice of developing software so that it guards against the accidental introduction of security vulnerabilities and resists misuse (src:wp:secure-coding): walked as the whole practice as practitioners and researchers describe it, from threat modelling and secure design through secure coding, memory-safe languages, code review, static analysis and fuzzing, to protecting the release and responding to the vulnerabilities that remain (NIST SSDF's four groups), with the people, organisations, incentives and laws that carry it.

Properties published scienceour proposal

Sourced fields, and our own readings.

born at1974-1975 (Saltzer and Schroeder; manuscript received October 1974, revised 1975)
born precisionyear
boundaryInside: the practices that build software to resist misuse: security requirements and threat modelling, secure design principles, secure coding and memory-safe languages, code review, static analysis, fuzzing and other security testing, protecting the build and release (signing, bills of materials), responding to residual vulnerabilities and fixing their root causes, and the organisational processes and training that carry them (SSDF, SDL, DevSecOps). Outside: the software itself, the vulnerabilities in it, the attackers, the operating systems and languages it builds on, the computer and information security operations that detect and respond after deployment, markets and law.
nested levelA practice carried by people and organisations (rung 12, technological and social), working on software; the build-time part of computer security, framed by information security's goals and risk methods.
scaletechnological

Measures (27) published science

characteristic clock: average vulnerability lifetime in code (half-life shape)~4 (Chromium ~2, OpenSSL ~7) years
median time-to-fix, OSS-Fuzz bugs5.3 (flaky bugs 43) days
unfixed fuzzer bugs: median age at collection437 (95% between 90 and 1275) days
disclosure deadline (OSS-Fuzz)90 days after discovery, or 30 days after the patch
OSS-Fuzz bugs studied23,907 in 316 projects bugs
memory-safety share of Android vulnerabilities76% (2019) to 24% (2024)
memory-safety share of Chromium high-severity security bugs~70 %
vulnerability density, 5-year-old code vs new code3.4x to 7.4x lower ratio
Rust memory-safety bugs studied (all Rust memory-safety CVEs to 2020-12-31 and more)186; all but one compiler bug need unsafe code bugs
commit-to-merge time vs vulnerability lifetime~20 days vs years
Copilot programs vulnerable in high-risk CWE scenarios~40 of 1,689 programs (89 scenarios) %
AI-assistant user study47 participants, 5 tasks; 87% of secure answers needed significant edits participants / %
single SAST tool: vulnerable commits with a warning in the vulnerable function52 (combined tools 78; at least 76% of warnings irrelevant; 22% undetected)
formal inspection latent-defect discovery rate (testing ~30%)60-65 %
optimal code review rate200-400 lines of code per hour
code review: respondents who say finding vulnerabilities is their responsibility81 (126 of survey) %
malicious packages: share typosquatting; mean edit distance to target61%; 2.3 % ; Levenshtein distance
malicious package availability before public report (mean; median 67)209 days
open source in commercial codebases96% contain it; 70-90% of a typical codebase
malicious packages studied174 (npm, PyPI, RubyGems, Nov 2015 - Nov 2019) packages
SolarWinds malicious update installs>18,000 organisations
Miller's 1990 fuzz study: utilities crashed25-33 %
bugs expected in a 35-million-line program (security-critical share)1,000,000 (perhaps 1%) bugs
SSDF practice groups4 (PO, PS, PW, RV) groups
position papers received for the SSDF update>150 papers
secure development methodologies reviewed28 methodologies
kinetic proofreading cost (cross-domain, tRNA charging): ATP per charge, right vs wrong amino acid1.5 vs 270; error reduced by a factor of 1/180 ATP per tRNA

Open contentions (4) open contention

Where sources or readings disagree. Both stay on the map.

Partners and parts published science

Built from / builds (13)

Sits inside / holds (2)

Trades with (valence) (14)

expressed by (22)

floor filled by (15)

Kinds (6)

Notes published science

Layers

The ways it takes in its world, where they meet, and how it acts back, each from L1 (where it meets the world) up.

secure software development as practitioners describe it: the code, components and threats it takes in, up to software that resists misuse (reader's view)

  1. L1: The material the practice faces: code being written (by people and AI assistants), third-party components, inputs that cross trust boundaries, and attackers
  2. L2: Taking it in: review by people, static analysis, fuzzing, threat elicitation, disclosure programmes, dependency intake
  3. L3: Findings: weaknesses, warnings, crashes and threats, triaged; most come from a few common error kinds
  4. L4: The shared risk picture: threat model and security requirements
  5. L5: Design and implementation decisions: principles (least privilege, fail-safe defaults, complete mediation), memory-safe languages, safe APIs, mitigations
  6. L6: The organisation's process: SSDF, SDL, DevSecOps (shift left), training, protecting the software
  7. L7: Purpose: software that resists misuse; residual vulnerabilities answered and their root causes removed

the boardroom (shared floors)

  1. L4: The shared picture of risk: the threat model and security requirements, where findings from review, tools, fuzzing, reports and attack research meet
  2. L5: Design and implementation decisions: secure design principles, memory-safe languages, safe APIs, mitigations, fixes
  3. L6: The organisation's process: SSDF practice groups, life-cycle methods (SDL, DevSecOps, 28 methodologies), training, gates, segmentation; obligations from law and market
  4. L7: Purpose and response: software that resists misuse, residual vulnerabilities answered, root causes fixed so they do not recur

way in: Attacks and attack research

  1. L1: Attackers and offensive researchers develop new attacks; penetration exercises beat every general-purpose system tried (1970s)
  2. L2: Published as attack techniques and incidents (1972 overflow study; Morris worm 1988)
  3. L3: Modelled: attack building blocks toward exploitation

way in: Code review (people reading code)

  1. L1: The change put up for review; at least one reviewer is not the author
  2. L2: Read by people at 200-400 lines per hour (sight, thought)
  3. L3: Findings: formal inspections find 60-65% of latent defects; security rarely the first focus unless asked

way in: Code suggested by AI assistants

  1. L1: Suggestions from a model trained on unvetted public code
  2. L2: Accepted or edited by the developer: 87% of secure answers needed significant edits
  3. L3: In the code: about 40% of 1,689 Copilot programs vulnerable; assisted users wrote less secure code and believed it secure

way in: Fuzzing (the running program probed with inputs)

  1. L1: Inputs that cross a trust boundary
  2. L2: Generated and mutated inputs; grey-box fuzzers evolve a seed pool by coverage
  3. L3: Crashes triaged into bugs: 23,907 bugs in 316 OSS-Fuzz projects, found in punctuated spikes

way in: Money, markets and law

  1. L1: Markets and law: bad security products drive out good; liability largely ineffective for software
  2. L2: Rules arrive: Executive Order 14028 led to the SSDF update; liability waivers for audited vendors proposed
  3. L3: Obligations: the vendor faces an audit or liability

way in: New code: what developers write

  1. L1: Source code as it is written: in memory-unsafe languages (C, C++) pointers are raw addresses with no bounds checks; a 35-million-line program may hold a million bugs
  2. L2: The change: a commit or diff; vulnerabilities sit mostly in new or recently changed code
  3. L3: Its flaws age out: vulnerability density falls exponentially with code age (half-life); average lifetime about 4 years

way in: Static analysis (SAST)

  1. L1: Source code and components, white box
  2. L2: Rules matched against the code
  3. L3: Warnings: one tool warns in 52% of vulnerable commits, 76% of warnings irrelevant, combined tools 78%

way in: Third-party components (the supply chain)

  1. L1: Components, libraries, tools and processes; 96% of commercial codebases contain open source, 70-90% of a typical codebase
  2. L2: Resolved and installed by dependency managers, install scripts run automatically; 61% of malicious packages typosquat
  3. L3: Inventory and detection: a bill of materials; malicious packages live 209 days on average before reported

way in: Threat modelling (the system and its likely attackers)

  1. L1: The system as designed, its assets, the probable attacker
  2. L2: Threats elicited: STRIDE checklists, attack trees, data-flow diagrams; with people, a set of evolving practices
  3. L3: Threats enumerated and prioritised

way in: Vulnerability reports from outside

  1. L1: Information from acquirers, users and public sources; in Chromium about 70% of high-severity bugs are memory unsafety
  2. L2: Received through a vulnerability disclosure programme
  3. L3: Analysed for root causes

way in: What developers know (inner)

  1. L1: Training and knowledge: most companies give no security training yet expect security in review
  2. L2: Recall while writing: insecure practices and their secure alternatives taught to developers
  3. L3: Choices made: most vulnerabilities come from a small number of common programming errors

way out: Release protected software

  1. L1: Delivered to acquirers through trusted channels (which supply-chain attackers also use)
  2. L3: Signed and verifiable: code signing and release integrity
  3. L6: Protect the software: all components kept from tampering

way out: Respond: patch and advise

  1. L1: The code on machines updated (the first generation: reactive patching)
  2. L5: Disclosure by deadline: fixed bugs disclosed 30 days after the patch or at 90 days
  3. L7: Respond to residual vulnerabilities

way out: Train the people

  1. L1: What developers know (the c-knowledge channel)
  2. L3: Insecure practices and secure alternatives taught
  3. L6: Role-based training for all who contribute

way out: Write and fix the code

  1. L1: The code changed: bounds checked, sizes limited (strncpy for strcpy), stack layout randomised
  2. L3: Merged: fuzzer-found bugs fixed with a median of 5.3 days
  3. L4: Enforced by the toolchain: the borrow checker at compile time; unsafe code marked and owned by the developer
  4. L5: Decision: a safe construct, a memory-safe language for new code, a fix

Sources (34) published science

Secure coding (Wikipedia, via Wikimedia Enterprise snapshot)
Souppaya M, Scarfone K, Dodson D. Secure Software Development Framework (SSDF) version 1.1. NIST SP 800-218, 2022, doi:10.6028/NIST.SP.800-218 (behind its links)
Vander Stoep J, Rebert A (Google). Eliminating Memory Safety Vulnerabilities at the Source. Google Security Blog, September 2024 (behind its links)
Szekeres L, Payer M, Wei T, Song D 2013. SoK: Eternal war in memory. IEEE Symposium on Security and Privacy (author copy) (behind its links)
Ding ZY, Le Goues C. An empirical study of OSS-Fuzz bugs. arXiv:2103.11518 (MSR 2021) (behind its links)
Perry N, Srivastava M, Kumar D, Boneh D. Do users write more insecure code with AI assistants? arXiv:2211.03622 (CCS 2023), doi:10.1145/3576915.3623157 (behind its links)
Software supply chain (Wikipedia, via Wikimedia Enterprise snapshot) (behind its links)
Anderson, Why Information Security is Hard: An Economic Perspective, ACSAC 2001 (doi:10.1109/ACSAC.2001.991552) (behind its links)
Secure by design (Wikipedia, via Wikimedia Enterprise snapshot) (behind its links)
Software engineering (Wikipedia, Wikimedia Enterprise snapshot 2026-11-01 via tools/wme) (behind its links)
Microsoft Security Development Lifecycle (Wikipedia, via Wikimedia Enterprise snapshot) (behind its links)
DevOps (section DevSecOps, shifting security left) (Wikipedia, via Wikimedia Enterprise snapshot) (behind its links)
Hopfield JJ, Yamane T, Yue V, Coutts SM. Direct experimental evidence for kinetic proofreading in amino acylation of tRNAIle. PNAS 73(4), 1976, doi:10.1073/pnas.73.4.1164 (Europe PMC, PMC430221) (behind its links)
Alexopoulos N, Brack M, Wagner JP, Grube T, Mühlhäuser M. How Long Do Vulnerabilities Live in the Code? A Large-Scale Empirical Measurement Study on FOSS Vulnerability Lifetimes. USENIX Security 2022 (behind its links)
The Chromium Projects. Memory safety (behind its links)
Xu H et al. 2021. Memory-safety challenge considered solved? An in-depth study with all Rust CVEs. arXiv:2003.03296 (TOSEM) (behind its links)
Pearce H, Ahmad B, Tan B, Dolan-Gavitt B, Karri R. Asleep at the keyboard? Assessing the security of GitHub Copilot's code contributions. arXiv:2108.09293 (IEEE S&P 2022) (behind its links)
Charoenwet W, Thongtanunam P, Pham V-T, Treude C. An empirical study of static analysis tools for secure code review. arXiv:2407.12241 (ISSTA 2024) (behind its links)
Code review (Wikipedia, via Wikimedia Enterprise snapshot) (behind its links)
Braz L, Bacchelli A. Software security during modern code review: the developer's perspective. arXiv:2208.04261 (ESEC/FSE 2022) (behind its links)
Ohm M, Plate H, Sykosch A, Meier M. Backstabber's knife collection: a review of open source software supply chain attacks. arXiv:2005.09535 (DIMVA 2020) (behind its links)
Fuzzing (Wikipedia, via Wikimedia Enterprise snapshot) (behind its links)
Kudriavtseva A, Gadyatskaya O. Secure software development methodologies: a multivocal literature review. arXiv:2211.16987 (behind its links)
Threat model (Wikipedia, via Wikimedia Enterprise snapshot) (behind its links)
Static application security testing (Wikipedia, via Wikimedia Enterprise snapshot) (behind its links)
Saltzer and Schroeder, The Protection of Information in Computer Systems, Proceedings of the IEEE 63(9), 1975 (doi:10.1109/PROC.1975.9939) (behind its links)
Memory safety (Wikipedia, via Wikimedia Enterprise) (behind its links)
Manès VJM et al. The art, science, and engineering of fuzzing: a survey. arXiv:1812.00140 (IEEE TSE 2019) (behind its links)
Forrest S, Somayaji A, Ackley DH. Building diverse computer systems. HotOS-VI, 1997 (behind its links)
Huang Z, Biczók G, Liu M. Incentivizing secure software development: the role of voluntary audit and liability waiver. arXiv:2401.08476 (behind its links)
Hutchins, Cloppert and Amin, Intelligence-Driven Computer Network Defense Informed by Analysis of Adversary Campaigns and Intrusion Kill Chains, ICIW 2011 (behind its links)
Hamer, Bowen, Haque, Madden, Hines, Williams 2025. Closing the Chain: How to reduce your risk of being SolarWinds, Log4j, or XZ Utils. arXiv:2503.12192 (behind its links)
Dissanayake N, Jayatilaka A, Zahedi M, Babar MA. Software security patch management: a systematic literature review of challenges, approaches, tools and practices. Information and Software Technology 2022 (arXiv:2012.00544) (behind its links)
Rust (programming language) (Wikipedia, via Wikimedia Enterprise snapshot) (behind its links)