UK code
The UK AI cyber security code of practice explained
The government's code is voluntary and sets out 13 principles for securing AI systems. It works as a checklist even if you only buy AI tools.
Last reviewed against NCSC, Department for Science, Innovation and Technology and OWASP GenAI Security Project. Sources

What it is
Status and scope
The Department for Science, Innovation and Technology released the code and an implementation guide on 31 January 2025 [5]. The code is voluntary. It covers AI systems, including deep neural networks such as generative AI, and arranges its requirements around design, development, deployment, maintenance and the end of a system's life [6]. Academic research systems that will never be deployed are left out [6].
Next steps are international. The government said it intends to put the code and guide forward to ETSI, to underpin a new standard (TS 104 223) and guide (TR 104 128), and to revise its own documents to match once that standard exists [5].
Who it covers
Four roles
The code allocates its principles by role [6]. One organisation can hold several roles at the same time [6].
If you buy and configure AI tools, you are most likely a system operator.
Key points
- Developers create or adapt an AI model or system, including open-source models [6]
- System operators embed or deploy a model or system within their own infrastructure [6]
- Data custodians control data permissions and integrity [6]
- End-users and affected entities are not primary owners, but several provisions protect them [6]

The principles
All thirteen
| No. | Principle |
|---|---|
| 1 | Raise awareness of AI security threats and risks |
| 2 | Design your AI system for security as well as functionality and performance |
| 3 | Evaluate the threats and manage the risks to your AI system |
| 4 | Enable human responsibility for AI systems |
| 5 | Identify, track and protect your assets |
| 6 | Secure your infrastructure |
| 7 | Secure your supply chain |
| 8 | Document your data, models and prompts |
| 9 | Conduct appropriate testing and evaluation |
| 10 | Communication and processes associated with end-users and affected entities |
| 11 | Maintain regular security updates, patches and mitigations |
| 12 | Monitor your system's behaviour |
| 13 | Ensure proper data and model disposal |
The wording of all thirteen is taken from the code [6].

How to use it
A checklist for buyers
Principles 1, 4, 5, 7, 11 and 12 suit an organisation that deploys other people's tools: awareness, human responsibility, asset tracking, supply chain, updates and monitoring [6]. Score yourself against each, then take the gaps into the practical plan.
The code builds on the NCSC's earlier guidelines for secure AI system development, which the controls guide covers.
Keep reading
Read next
Prompt injection
Prompt injection controls for UK teams: why a full fix may never exist, and the NCSC and OWASP measures that reduce likelihood and impact.
Read the guide
AI agents
How to secure agentic AI tools in a UK organisation: what the NCSC says about oversight, sandboxing, access to systems and data, and staged adoption.
Read the guide
Shadow AI
What shadow AI is and how UK organisations can manage it: the NCSC's advice to understand why staff use unapproved AI tools, with practical steps.
Read the guideHow CyPro can help
Need a hand planning for this?
Understanding the change is one job. Working out what it means for your systems, your suppliers and your roadmap is several more. CyPro's consultants can take any of them on.
Fractional CISO for the board
A senior security lead who advises the board on what to fix first, what to accept and what to tell customers, and owns the decision record.
More on cypro.co.uk
Hardening and segmentation
Our consultants put the controls in place that limit the damage when something is missed: firewall rules, network isolation and tighter admin access.
More on cypro.co.uk
Penetration testing
A focused test of your systems and the controls around them, so you know they hold before an attacker finds out for you.
More on cypro.co.uk
Vulnerability scanning
Find every internet-facing system you run, including the forgotten ones, and see which are still on a vulnerable build.
See the scanning service
24/7 security monitoring
Our SOC analysts watch your systems day and night for the signs of an attack in progress: unexpected processes, new outbound connections, logins that do not fit.
More on cypro.co.uk
Incident response
If you may already be compromised, our responders contain it, preserve the evidence, find out what was touched and get you running again safely.
More on cypro.co.uk
Plan ahead
Want a plan for your organisation?
AI security starts with knowing which tools are in use, who owns them and what they can reach. CyPro can help set the governance, accountability and controls around that.