UK AI Cyber Security Code
Code of Practice for the Cyber Security of AI
United Kingdom
RAI-GB-NA-SECURIT-2025UK AI Cyber Security Code is Adopted in United Kingdom, according to gov.uk. We have not yet been able to confirm the status.
GuidelineCybersecurity and Model SecurityRisk ManagementSafety, Testing, and EvaluationThe UK's voluntary AI Cyber Security Code sets 13 security principles covering AI design, development, deployment and end of life.
Summary
Published on 31 January 2025, the UK's voluntary AI Cyber Security Code sets baseline security expectations through 13 principles covering the AI lifecycle. It allocates responsibilities to developers, system operators and data custodians, supported by an implementation guide and planned international standardisation through ETSI.
Full article
Read full text ↗Overview
The Code of Practice for the Cyber Security of AI is a voluntary UK government instrument published on 31 January 2025. It establishes baseline cyber security expectations for AI systems and the organisations developing and deploying them. Publication represents adoption of final government guidance rather than legislative passage or statutory commencement. The Code aims to protect AI systems, support public confidence and enable the benefits of AI adoption. It addresses AI-specific threats, including data poisoning, model obfuscation and indirect prompt injection, alongside distinctive challenges in data management.
The Code contains 13 principles organised into five lifecycle phases: secure design, secure development, secure deployment, secure maintenance and secure end of life. It forms the national component of a two-part intervention intended to support a global technical standard. An accompanying implementation guide supports adoption. The Code supplements conventional software security practices and addresses cyber security and model security, risk management, and testing and evaluation. It does not itself create statutory penalties, and independently applicable obligations, including data protection requirements, continue to apply.
Scope and Definitions
The Code covers AI systems, including deep neural networks and generative AI, and addresses both proprietary and open-source technologies. Developers are businesses, organisations or individuals that create or adapt AI models or systems. System Operators are organisations responsible for embedding or deploying AI within their infrastructure, including providers of contractual deployment services. Data Custodians control data permissions and integrity or establish policies governing data use and management. Multiple custodians may contribute to one system because development and deployment can involve different data sources.
One organisation can hold several roles, so responsibilities depend on its activities rather than its business label alone. End-users include employees and UK consumers using AI for work or everyday activities. The Code also identifies Affected entities as stakeholders, including entities that need not interact with a deployed application. It is not designed for academics creating and testing AI systems solely for research where those systems will not be deployed. Businesses that only offer or sell models and components without developing or deploying them are described as unlikely to fall within its scope, although other government codes may be relevant.
AI security is expressly treated as a subset of cyber security. Within the Code, 'shall' indicates a requirement, 'should' indicates a recommendation, and 'may' indicates possibility, including an organisation's or individual's ability to take an action. These distinctions govern adherence to the voluntary instrument; they do not independently turn its provisions into statutory duties. Some developer provisions are less applicable to open-source models, and the implementation guide supports interpretation for different system types.
Governance and Institutional Framework
The Department for Science, Innovation and Technology, or DSIT, leads the intervention in close collaboration with the National Cyber Security Centre, or NCSC. The official publication page explains that consultation respondents requested practical implementation support and that DSIT commissioned an implementation guide in response. The guide was prepared by John Sotiropoulos, identified as a Senior Security Architect at Kainos and co-lead of the OWASP Top 10 for LLM Applications. DSIT and NCSC officials reviewed each iteration. These arrangements support policy development and technical implementation of the voluntary Code.
Organisational responsibilities are allocated principle by principle. Principle 1 primarily applies to System Operators, Developers and Data Custodians, while Principle 2 primarily applies to System Operators and Developers. Principle 4 addresses enabling human responsibility for AI systems. The Code also directs senior leaders toward the government's cyber governance guidance and recognises that entities may have responsibilities under different regulatory regimes. Stakeholders using personal data, including pseudonymised data, are directed to relevant Information Commissioner's Office guidance on data protection obligations. Adoption of the Code complements, rather than displaces, those responsibilities.
Security Principles and Focus Areas
The secure-design phase addresses awareness of AI security threats, designing for security alongside functionality and performance, evaluating threats and managing risks, and enabling human responsibility. Organisational cyber security training is to include AI security content, be reviewed and updated regularly, and be tailored to staff roles. Staff are to maintain awareness of current AI-related threats and vulnerabilities and available mitigations. Developers are to receive training in AI-specific secure coding and system design, addressing vulnerabilities in algorithms, models and associated software.
Before deciding to create an AI system, a Developer or System Operator is to assess and document the business requirement or problem, associated security risks and mitigation strategies. This places security consideration at the decision-making stage rather than treating it solely as a technical activity after development. Human responsibility, role allocation and documented risk assessment provide the organisational foundation for security decisions throughout the lifecycle.
The secure-development principles address identifying, tracking and protecting assets; securing infrastructure; securing supply chains; and documenting data, models and prompts. Secure deployment covers appropriate testing and evaluation, together with communication and processes involving End-users and Affected Entities. Secure maintenance covers regular security updates, patches and mitigations, and monitoring system behaviour. Secure end of life covers proper data and model disposal. Together, the principles extend baseline security expectations from initial design through retirement of an AI system.
Implementation Framework
Implementation follows the stakeholder roles and lifecycle phases relevant to each activity. A developer deploying its own model may also be a System Operator, while an organisation embedding third-party AI can have operator responsibilities without creating the underlying model. Several entities may share responsibility across a supply chain, and an entity may perform developer, operator and data-custodian functions simultaneously. Businesses selling components without developing or deploying them are treated differently from entities that create or operate systems.
The Implementation Guide for the AI Cyber Security Code of Practice supports adherence to the voluntary Code and the planned international standard. It helps organisations interpret expectations for different system types, including open-source models. The guide complements the principles by providing implementation support rather than creating an independent statutory regime. Its development and official review arrangements are described on the government publication page.
A practical adoption approach is to map AI activities to stakeholder roles and lifecycle phases, compare existing security arrangements with applicable principles, and distinguish requirements expressed as 'shall' from recommendations expressed as 'should'. This is an organisational implementation approach, not a separate legal procedure. Organisations should also assess independently applicable duties and use the guide to support decisions about the principles relevant to their systems.
Monitoring and Evaluation
Principle 9, 'Conduct appropriate testing and evaluation', places assurance within secure deployment. Principle 12, 'Monitor your system's behaviour', extends attention to the operation of deployed systems. Principle 11 adds regular security updates, patches and mitigations. These principles connect pre-deployment evaluation with ongoing maintenance and observation, recognising that AI security must continue beyond initial design or launch.
Training is also subject to continuing review. The AI security content included in organisational cyber security training is to be reviewed and updated regularly, including when substantial new AI-related threats emerge. Role-specific training and awareness of current vulnerabilities and mitigations support this continuing security activity. The Code's approach combines technical assurance with organisational learning and responsibility.
At policy level, the government reports that 80% of consultation respondents endorsed the proposed intervention, with support for individual principles ranging from 83% to 90%. These figures measure consultation support rather than implementation outcomes or reductions in security incidents. Stakeholder feedback informed revisions to the Code and the commissioning of additional implementation guidance. The government also plans to update the Code and guide to mirror the future ETSI standard and accompanying guide.
Voluntary Status and Separate Legal Duties
The Code is voluntary guidance rather than primary legislation or a binding regulation. Its adoption status reflects publication of the final instrument on 31 January 2025. The word 'shall' identifies what is required within the voluntary Code, not an independently enforceable legislative command. The Code does not itself establish a statutory sanctions regime, and publication is not a statutory commencement event. Organisations should distinguish adherence to a voluntary security baseline from compliance with a separate binding legal obligation.
Voluntary status does not exempt an organisation from other law. The Code expressly identifies potentially applicable data protection obligations when personal data, including pseudonymised data, is used. It also recognises that stakeholders can have responsibilities under different regulatory regimes. Adoption is a security measure alongside those obligations, not a comprehensive liability framework or a substitute for assessing applicable law. The Code's formal terminology must therefore be read in the context of voluntary implementation.
Relationship to Other Instruments
The Code describes itself as an addendum to the Software Code of Practice within DSIT's modular approach to cyber security codes. Its stakeholder examples also refer to the Software Resilience Code of Practice, and its treatment of senior leadership responsibilities points toward the Cyber Governance Code of Practice. These relationships provide complementary layers of software security, organisational governance and AI-specific security guidance rather than replacing general security practices.
The Code builds on the NCSC Guidelines for Secure AI System Development, published in November 2023. It also points to Appendix B of the NIST Artificial Intelligence Risk Management Framework for examples of distinctive AI security risks. Relevant standards and publications are signposted at the beginning of principles to support coordination with established security approaches.
The 2024 Call for Views on the Cyber Security of AI places the intervention alongside the UK's wider AI regulatory approach, including the Safety, Security and Robustness principle, the National Cyber Strategy and the Science and Technology Framework. It distinguishes cyber security risks to AI from broader AI safety issues and cyber risks arising from AI use. The Code is consequently a focused AI cyber security instrument rather than a complete framework for fairness, transparency, liability or every other aspect of AI regulation.
International Alignment
International standardisation is integral to the intervention. DSIT, working closely with NCSC, plans to submit the Code and implementation guide to the European Telecommunications Standards Institute, or ETSI. The documents are intended to form the basis of a global standard, TS 104 223, and an accompanying implementation guide, TR 104 128. The government plans to update the domestic Code and guide to mirror those future outputs. This establishes a technical alignment pathway from voluntary national guidance to international standardisation.
The Code's international foundations include the NCSC secure-development guidelines and stakeholder feedback from the 2024 consultation. The final Code describes the earlier guidelines as endorsed by 19 international partners, while the consultation describes agencies from 18 countries co-sealing them. These figures describe different forms of participation and should be kept distinct. The consultation emphasises that threats cross borders and that stakeholders need clarity and international agreement on baseline security expectations. The international component is coordination through guidance and standards development, rather than a new cross-border statutory enforcement regime.
Implementation Timeline
| Milestone | Date | Significance |
|---|---|---|
| Call for Views begins | 2024-05-15 | The consultation opens to gather stakeholder views on the proposed AI cyber security intervention. |
| Call for Views closes | 2024-08-09 | Consultation feedback informs revisions to the Code and the development of practical implementation support. |
| Final voluntary Code published | 2025-01-31 | DSIT publishes the final government guidance. Publication marks adoption of a voluntary Code, not statutory commencement. |
Implementation Checklist
| Check | Action |
|---|---|
| Determine scope and roles | Identify Developer, System Operator and Data Custodian activities, including overlapping roles, third-party deployment, open-source systems and the research-only exclusion. |
| Understand voluntary terminology | Distinguish 'shall' requirements within the Code from 'should' recommendations and 'may' statements of possibility. |
| Maintain AI security awareness | Include AI security in cyber security training, tailor content to staff roles, review it regularly and maintain awareness of current threats and available mitigations. |
| Train developers | Provide AI-specific secure coding and system design training addressing vulnerabilities in algorithms, models and associated software. |
| Assess design-stage risks | Before deciding to create a system, assess and document its business requirement or problem, security risks and mitigation strategies. |
| Map lifecycle principles | Review applicable expectations for human responsibility, asset protection, infrastructure, supply chains, documentation, testing, communication, maintenance, monitoring and disposal. |
| Use implementation support | Consult the official implementation guide for different system types and the applicability of provisions to open-source development. |
| Assess separate legal duties | Evaluate independently applicable regulatory obligations, including data protection requirements for personal and pseudonymised data. |
| Track international alignment | Follow official updates concerning the planned ETSI standard, implementation guide and corresponding updates to the UK documents. |
Sources and References
| Source | Type |
|---|---|
| Code of Practice for the Cyber Security of AI | official |
| AI Cyber Security Code of Practice publication page | official |
| Implementation Guide for the AI Cyber Security Code of Practice | official |
| Call for views on the Cyber Security of AI | official |
More AI regulation in United Kingdom
© Regulations.AI — created on 21 Nov 2026 using Gemini 3.6 Flash