The Software Security Code of Practice, published on 7 May 2025 by the UK Department for Science, Innovation and Technology and co-designed with the National Cyber Security Centre, is a voluntary code for organizations that develop or sell software to businesses and other organizations. It has 14 principles in four themes: secure design and development, build environment security, secure deployment and maintenance, and communication with customers. A Senior Responsible Owner at the top of the organization should gain assurance that each is met. Most principles match SSDF and CRA practices; the distinctive ones are publishing the level of support and giving at least a year's notice of end of support.
- The Code is voluntary and aimed at senior leaders in software vendors. It applies to all organizations that develop or sell software to businesses or other organizations.
- Each principle is introduced by the same line: the Senior Responsible Owner “shall gain assurance” that the organization achieves it.
- Principle 4.2 is the only numeric commitment: at least one year's notice before a product stops being supported or maintained.
- The NCSC publishes implementation guidance (7 May 2025) and a self-assessment template that vendors can share with customers; the government says it is developing a certification scheme.
- The Code says it reflects international practice, including the US SSDF and the EU Cyber Resilience Act, so one evidence set can serve all three.
- In January 2026 DSIT and the NCSC launched the Software Security Ambassadors Scheme, in which signatory organizations promote and model the Code.
| Setting | Value | Note | Source |
|---|---|---|---|
| Publisher | Department for Science, Innovation and Technology, co-designed with the NCSC | — | Software Security Code of Practice |
| Status | Voluntary | — | Software Security Code of Practice |
| Structure | 14 principles in 4 themes | — | Software Security Code of Practice |
| Accountable person | A Senior Responsible Owner at the top tier of the organization | — | Software Security Code of Practice |
| End-of-support notice | At least 1 year | — | Principle 4.2 |
| How to show conformance | Self-assessment (NCSC template), shareable with customers | The government said it is developing a certification scheme. | Software Security Code of Practice; NCSC |
- Check that each of the 14 principles has a named owner, a claim and current evidence in your self-assessment.
- Fetch your published support policy and run the CI check against it; confirm every supported version has a level of support and an end date.
- Confirm every end-of-support date was announced at least a year before it takes effect, using the announcement records.
- Submit a test report through your published disclosure channel and time the acknowledgement against your stated target.
- Review who can change release workflows and runner images, and confirm those changes are reviewed and logged.
- Applies to
- Software Security Code of Practice (DSIT) Published 7 May 2025; page updated 15 January 2026
- NCSC Software Security Code of Practice implementation guidance Version 1.0, 7 May 2025
Organizations that develop or sell software to businesses or other organizations, in the UK or selling to UK customers. The Code is voluntary; customers may make it a contract term.
- Part of
- Workflow: Build an AppSec program
Learning goals and prerequisites
What you will learn
- Explain who the Code is for, its voluntary status and how conformance is shown.
- Map each of the 14 principles to engineering practices and evidence, and to SSDF and the CRA where they overlap.
- Publish a support policy that meets principles 4.1 and 4.2 and check it in CI.
Before you start
Engineering, product security and release leads at companies that develop or sell software to businesses and public bodies, and the senior owner who signs off conformance
- Know your release process, build pipeline and how customers learn about security fixes.
- Know how long each version of your software is supported.
Refresh first: Apply NIST SSDF (SP 800-218) to one product: practices, evidence and attestation in 2026
Go to the guided practiceThe Code sets out what a software vendor should do so that the software it sells is secure to build, ship and run. It is issued by the Department for Science, Innovation and Technology, co-designed with technical experts at the NCSC and an industry and academic group, and it is voluntary. It applies to “all organisations that develop and/or sell software to businesses or other organisations” and is aimed at senior leaders in those vendors, because each principle is something a Senior Responsible Owner must gain assurance about rather than a task for one team.
It is not a law. The UK's Cyber Security and Resilience Bill, introduced on 12 November 2025 and still before the House of Lords in October 2026, would bring medium and large managed service providers under the NIS Regulations, but it does not make this Code mandatory. Customers can, however, ask for conformance in procurement, and the NCSC's implementation guidance and self-assessment template make the evidence easy to request.
The first column quotes each principle. The practice column is one way to meet it; the SSDF column names the SSDF 1.1 practices or tasks that cover the same ground, and the CRA column the Regulation (EU) 2024/2847 provisions that overlap, for teams selling in the EU as well.
| Principle | Practice and evidence | SSDF 1.1 | EU CRA |
|---|---|---|---|
| 1.1 Follow an established secure development framework. | Adopt a framework such as NIST SSDF and keep an evidence matrix per release | PO.1 to RV.3 | Annex I Part I(1) |
| 1.2 Understand the composition of the software and assess risks linked to the ingestion and maintenance of third-party components throughout the development lifecycle. | An SBOM for every build; an intake review before adding a dependency; health checks on what you already use | PW.4.1, PW.4.4, PS.3.2 | Annex I Part II(1); Art. 13(5) |
| 1.3 Have a clear process for testing software and software updates before distribution. | Security tests that gate releases and updates, with results bound to the artifact | PW.7, PW.8 | Annex I Part II(3) |
| 1.4 Follow secure by design and secure by default principles throughout the development lifecycle of the software. | Threat modeling at design review; secure defaults with tests that assert them | PW.1, PW.9 | Annex I Part I(2)(b), (j) |
| 2.1 Protect the build environment against unauthorised access. | Short-lived CI credentials, MFA for administrators, isolated runners, least-privilege tokens | PO.5.1, PS.1.1 | No direct equivalent |
| 2.2 Control and log changes to the build environment. | Pipeline and runner configuration as reviewed code; retained audit logs | PO.3.2, PO.5 | No direct equivalent |
| 3.1 Distribute software securely to customers. | Signed releases with provenance and published verification steps | PS.2.1, PS.3.1 | Annex I Part II(7) |
| 3.2 Implement and publish an effective vulnerability disclosure process. | A disclosure policy, security.txt and triage targets that are measured | RV.1.3 | Annex I Part II(5), (6) |
| 3.3 Have processes and documentation in place for proactively detecting, prioritising and managing vulnerabilities in software components. | Scanning against the SBOM, VEX statements, a prioritization policy | RV.1.1, RV.2 | Annex I Part II(1), (2) |
| 3.4 Report vulnerabilities to relevant parties where appropriate. | Reports to upstream maintainers, CVE requests, advisories | RV.1.3 | Art. 13(6); Art. 14 |
| 3.5 Provide timely security updates, patches and notifications to customers. | Fix timelines by severity, advisories with every security release | RV.2.2 | Annex I Part II(2), (4), (8) |
| 4.1 Provide information to the customer specifying the level of support and maintenance provided for the software being sold. | A published, machine-readable support policy per version | None | Art. 13(19); Annex II point 7 |
| 4.2 Provides at least 1 year's notice to customers of when the software will no longer be supported or maintained by the vendor. | End-of-support dates announced a year ahead, checked in CI | None | None (Art. 13(8) sets a minimum support period instead) |
| 4.3 Make information available to customers about notable incidents that may cause significant impact to customer organisations. | An incident communication process with templates and owners | None | Art. 14(8) |
Theme 2 is where the Code goes further than many questionnaires. Principle 2.1 means nobody, human or machine, can change what the pipeline builds without authorization: CI jobs use short-lived identity tokens instead of stored secrets, runners for release builds are isolated from untrusted pull requests, administrators use MFA and tokens carry only the permissions a job needs. Principle 2.2 means every change to the build itself, such as a workflow file, a runner image or a signing key, goes through review and leaves a log you keep.
The guides on /domains/supply-chain/ci-cd/github-actions-hardening/ and /domains/supply-chain/ci-cd/build-integrity/ cover the controls; the evidence is the ruleset that protects workflow files, the identity configuration, runner isolation settings and audit logs retained for your review period.
Principles 3.2 to 3.5 describe the vulnerability lifecycle end to end. Publish how to report a vulnerability (3.2), with a security.txt file as RFC 9116 describes and a policy that says what reporters can expect. Detect problems in your components before someone reports them (3.3), by scanning against the SBOM of each release and recording exploitability decisions as VEX (/domains/supply-chain/vex/producer-and-consumer-decisions/). Report to the people who need to know (3.4), such as the maintainer of a vulnerable component you use. And ship fixes on timelines you publish, with an advisory that tells customers what to do (3.5).
Principle 4.3 adds incidents: tell customers about notable incidents that may significantly affect them. Write the templates and name the owner before you need them; the same process serves CRA Article 14(8), which requires manufacturers to inform impacted users of exploited vulnerabilities and severe incidents.
Principles 4.1 and 4.2 are the most concrete in the Code: say what support each version gets, and give customers at least a year's notice before it ends. Publish the policy as data on your site, so customers can monitor it and you can check it in CI. The same file can carry the EU dates: from 11 December 2027 the CRA requires a support period of at least five years unless the product is expected to be in use for less (Art. 13(8)), and the end date, at least the month and year, must be clear at the time of purchase (Art. 13(19)).
{
"vendor": "Example Software Ltd",
"published_at": "https://example.com/security/support-policy.json",
"versions": [
{
"product": "Ledger Desktop",
"version": "5.x",
"support": "security and bug fixes",
"end_of_support": "2033-03-31",
"end_announced": "2025-06-02",
"eu_first_placed": "2028-01-15"
},
{
"product": "Ledger Desktop",
"version": "4.x",
"support": "security fixes only",
"end_of_support": "2027-06-30",
"end_announced": "2026-05-04"
},
{
"product": "Ledger Sync API",
"version": "v1",
"support": "security fixes only",
"end_of_support": "2027-09-30",
"end_announced": "2026-09-01"
}
]
}The script flags a version with no stated level of support, an end date announced less than a year ahead, and, for products first placed on the EU market from 11 December 2027, a support period shorter than five years or the stated expected use. It prints support policy OK for the file above. Move the 4.x announcement to 1 August 2026 and it fails, because 30 June 2027 is less than a year later.
"""Check a published support policy: UK Code principles 4.1 and 4.2, and CRA Art. 13(8).
Usage: python3 check_support_policy.py support-policy.json
"""
import json
import sys
from datetime import date
# The CRA support period applies to products placed on the EU market from this date.
CRA_APPLIES = date(2027, 12, 11)
def add_years(day, years):
try:
return day.replace(year=day.year + years)
except ValueError: # 29 February in a year that has none
return day.replace(year=day.year + years, day=28)
def problems(policy):
found = []
for v in policy["versions"]:
name = f"{v['product']} {v['version']}"
if not v.get("support"):
found.append(f"{name}: no level of support stated (UK Code 4.1)")
end = date.fromisoformat(v["end_of_support"])
announced = date.fromisoformat(v["end_announced"])
if end < add_years(announced, 1):
found.append(f"{name}: end {end} announced on {announced}, under a year (UK Code 4.2)")
placed = v.get("eu_first_placed")
if placed and date.fromisoformat(placed) >= CRA_APPLIES:
years = min(5, v.get("expected_use_years", 5))
if end < add_years(date.fromisoformat(placed), years):
found.append(f"{name}: support ends within {years} years of EU placing (CRA 13(8))")
return found
if __name__ == "__main__":
with open(sys.argv[1], encoding="utf-8") as f:
issues = problems(json.load(f))
print("\n".join(issues) or "support policy OK")
sys.exit(1 if issues else 0)The Code follows the NCSC's principles-based assurance approach. The NCSC's implementation guidance explains each principle, and a separate Assurance Principles and Claims document expresses conformance as outcome-related claims; the self-assessment template can be kept internally or shared with customers. The Code says the government is developing a certification scheme; until one exists, make the self-assessment specific enough that a customer can check each claim against its evidence.
Write the self-assessment the way you would write an SSDF evidence matrix (/frameworks/ssdf-product-lifecycle/): one row per principle, the claim, the evidence and the owner, reviewed by the Senior Responsible Owner. Since January 2026 DSIT and the NCSC also run a Software Security Ambassadors Scheme, in which signatory organizations commit to model and promote the Code; joining it is a commitment, not an assessment of your products.
Guided practice
A UK council asks Fenwick Systems (fictional) to confirm conformance with the Software Security Code of Practice before renewing a contract for its case-management software. Review Fenwick's draft self-assessment and decide which claims hold.
Supplied scenario material
Fenwick Systems draft self-assessment (fictional), signed by the head of engineering, 2026-10-06
P1.2 Met: "We use well-known open-source libraries." No SBOM; dependency updates are ad hoc.
P2.1 Met: "CI is in the cloud." Release builds run on shared runners that also build pull requests from forks;
a long-lived deploy key with write access is stored as a CI secret.
P3.2 Met: security@fenwick.example on the contact page. No policy; last two reports took 41 and 66 days to acknowledge.
P4.1 Met: "Support terms are in the contract."
P4.2 Met: Version 7 support ends 2026-12-31; customers were emailed about it on 2026-09-15.
P4.3 Not assessed.
Organization: no Senior Responsible Owner named; the CTO has not seen the draft.1. Check who signs
Decide whether the draft can be sent as it is.
Expected result and reasoning
No. The Code expects a Senior Responsible Owner at the top tier of the organization to gain assurance that each principle is met. The head of engineering can prepare the draft, but a named SRO, here plausibly the CTO, needs to review and own it.
2. Test the composition and build claims
Judge P1.2 and P2.1.
Expected result and reasoning
Neither is met. Principle 1.2 asks Fenwick to understand the software's composition and assess third-party component risk throughout the lifecycle: that needs an SBOM per build and an intake and update process. Principle 2.1 asks for protection against unauthorized access to the build environment: release builds on runners shared with fork pull requests and a long-lived write key break that. Isolate release runners and replace the key with short-lived credentials.
3. Test the disclosure claim
Judge P3.2.
Expected result and reasoning
Partly met at best. An inbox is a channel, but principle 3.2 asks for an effective, published process: a policy saying what reporters can expect, a
security.txtfile and acknowledgement times that are kept. Responses of 41 and 66 days show it isn't effective yet.4. Test the support claims
Judge P4.1 and P4.2 with dates.
Expected result and reasoning
P4.1 needs information customers can find about the level of support for the software, not terms buried in each contract; publish a support policy per version. P4.2 fails: notice on 15 September 2026 for an end on 31 December 2026 is about three and a half months, not the year the Code asks for. Extend version 7 support to at least 15 September 2027 or accept the claim is not met.
5. Write the honest answer
Draft the reply to the council.
Expected result and reasoning
Tell the council which principles are met with evidence, which are partly met and which are not, with dates for fixes: SBOM and update process, isolated release builds, a published disclosure policy, a published support policy and an incident communication process for 4.3. The Code is voluntary, so an accurate self-assessment with a plan is worth more than a page of unsupported claims.
Fenwick and the council are fictional. The Code is voluntary; contract terms decide what a customer can require.
Save a draft on this device to resume later. Automatic saving begins after you choose Save. Drafts are never sent by this application; use synthetic data.
No draft saved on this device yet.
Sources & further reading
The standards, specifications and documentation behind the guidance above. Each is the evidence for a claim on this page; consult it for detail beyond the defaults and versions listed here.
- DSIT: Software Security Code of Practice (publication page). Published 7 May 2025; updated 15 January 2026.
- DSIT: Software Security Code of Practice (HTML). 7 May 2025, updated 15 January 2026.
- NCSC: Software Security Code of Practice implementation guidance. Version 1.0 (7 May 2025).
- DSIT: Software Security Ambassadors Scheme. Published 15 January 2026; updated 1 October 2026.
- DSIT: Cyber Security and Resilience (Network and Information Systems) Bill factsheets. Published 12 November 2025; updated 30 June 2026.
- UK Parliament: Cyber Security and Resilience (Network and Information Systems) Bill, stages. HL Bill 49, as amended in Grand Committee (7 September 2026).
- NIST SP 800-218: Secure Software Development Framework (SSDF). Version 1.1 (February 2022).
- Regulation (EU) 2024/2847 (Cyber Resilience Act), Article 13. OJ L 2024/2847, 20 November 2024.
- RFC 9116: A File Format to Aid in Security Vulnerability Disclosure. April 2022.
Reference information
- SDLC phase
- MaintenanceSecurity program