AI, open code and vulnerability risk in the public sector
This guidance from the UK government advises public sector technology leaders to maintain an 'open by default' policy for source code, despite concerns about AI-accelerated vulnerability discovery. It emphasizes that system weaknesses and slow remediation are the primary drivers of exploitation risk rather than source code visibility. Furthermore, it outlines a minimum operational standard for publicly accessible systems and restricts closing repositories to narrow, justified exceptions.
Summary and content fields are drawn from the document text and are pending editorial review.
Who issued it
Who it governs
Public sector technology leaders and developers who need to decide whether to publish source code in open repositories safely.
What the document contains
This guidance addresses how public sector departments should handle source code publication in the context of AI-accelerated vulnerability discovery. It establishes a minimum operational standard for publicly accessible systems and defines criteria for when code may be kept closed as an exception.
It does not provide legal penalties for non-compliance, technical code-level vulnerability scanning tools, or formal regulatory enforcement mechanisms.
- Public sector source code should remain open by default, avoiding blanket closures due to AI security concerns.
- System weaknesses and poor remediation capacity are the primary drivers of exploitation risk, not code visibility.
- Teams must meet a minimum operational standard that includes clear ownership, automated hygiene, and secure-by-design practices before publishing code.
- Exceptions to openness must be narrow, time-bound, and justified by a specific, credible threat model.
- Private repositories can create a false sense of security and reduce external scrutiny and reuse.
· Recommendations · Current published advice on open source · Advances in AI-enabled vulnerability detection · Additional considerations · Minimum standard for publicly-accessible systems · Avoid 'private by default' · Additional resources
How it scores
Each score is backed by a quote verified against the document text. Editorial review has not yet confirmed them.
Accountability
4/5Clear responsibility for AI outcomes
a named owner and maintenance plan, including a current service or team owner who is accountable for the repo
Minimum standard for publicly-accessible systems
screening score · 2026-11-26
Fairness
0/5Non-discrimination and equitable treatment
screening score · 2026-11-26
Human Dignity
0/5Respect for the inherent worth of persons
screening score · 2026-11-26
Human Oversight
0/5Humans remain in control of consequential decisions
screening score · 2026-11-26
Privacy
2/5Protection of personal data and private life
Departments should treat privacy as an exception control for specific, credible routes to harm
Avoid ‘private by default’
screening score · 2026-11-26
Transparency
5/5Openness about how AI systems work and are used
Openness should remain the default posture, with closure used sparingly and deliberately.
Recommendations
screening score · 2026-11-26
Enforcement
2/5Consequences and compliance mechanisms with real force
If a team cannot meet the minimum standard, leaders should address the underlying operational gap.
Minimum standard for publicly-accessible systems
screening score · 2026-11-26
Impact Assessment
4/5Required assessment of an AI system's risks/impacts before or during use
Where code should be closed, require a short threat model that states the attacker, what publication adds, and the realistic path to harm.
Recommendations
screening score · 2026-11-26