How to Write an Internal AI-Generated Code Policy (Using Debian and Linux's Playbook)
Debian, the Linux kernel, and GCC just spent a year arguing over AI-generated code so you don't have to. Here's the policy framework they landed on, and how to adapt it for your team.
- 01Open-source projects like Debian and Linux have already established tested AI-generated code policies.
- 0263% of breached organizations lack an active AI governance policy, exposing them to shadow AI risks.
- 03The Linux kernel requires an Assisted-by tag to ensure human accountability for AI-assisted commits.
- 04GCC adopted a strict policy rejecting legally significant contributions derived from AI.

To create an internal AI-generated code policy, borrow the framework open-source projects just finished building: require disclosure of AI assistance in commits, keep a human accountable for every contribution, verify the AI tool's terms don't conflict with your licensing or confidentiality obligations, and require review before any bulk AI-generated change ships. That's the short version. The long version just got tested in public, by Debian, the Linux kernel, and GCC.
Open-source already fought this fight
Most companies are still debating whether to write an AI code policy. The infrastructure projects underneath the entire software industry already finished the debate and published the results.
In August 2026, Debian ran an eight-proposal General Resolution on LLM usage, a vote so contested it needed choices A through H, ranging from an outright ban to a stance of neither endorsing nor prohibiting generative AI.1 The Linux kernel finalized a formal AI Coding Assistants policy after a maintainer got caught submitting an undisclosed, fully LLM-written patch with a performance bug in it.23 GCC, the compiler toolchain underneath most of the open-source world, went further and adopted a policy that flatly rejects legally significant AI-derived contributions.4
Three major projects, three different risk tolerances, one shared set of mechanics. That's the blueprint worth stealing.
| Overall stance | Strictness | Requires disclosure tag | Human accountability required | Hard size threshold | |
|---|---|---|---|---|---|
| Debian (Proposal B)orgs wanting nuanced, condition-based rules | Neither endorses nor prohibits | Medium | Yes | Yes | No |
| Linux kernelorgs wanting tag-and-trust mechanics | Allowed with Assisted-by tagging | Medium | Yes | Yes | No |
| RecommendedGCChigh-risk, regulated, or sensitive codebases | Rejects legally significant AI-derived contributions | High | No | Yes | Yes |
Why your company already has a shadow AI code problem
While these projects argued about governance, employees at ordinary companies kept shipping AI-assisted code with no policy at all. IBM's 2025 Cost of a Data Breach Report found that 63% of breached organizations either have no AI governance policy or are still drafting one.5 Only 37% have any policy to manage AI use or detect shadow AI in the first place.5 One in five organizations that suffered a breach traced it to shadow AI usage.5
The consequences aren't abstract. Shadow-AI-linked breaches exposed more personal data and intellectual property than the average breach, and organizations with high shadow AI use absorbed an extra $670,000 in breach costs compared to those with low or no shadow AI exposure.5 We've covered the mechanics of this exposure before in The Shadow AI Tech Stack and in The Security Threat of Agentic Code. Open source just handed IT departments a tested answer.
What did Debian's general resolution actually decide?
Debian's winning position, "Responsible Use of Generative AI," is worth reading closely because it states a principle most corporate policies skip entirely: using an AI tool does not reduce the contributor's responsibility for the resulting work, and accepting AI-generated material without human review breaks with established development practice.1
Across the eight proposals, a shared set of guardrails emerged:
- Tooling legal compatibility. Confirm the AI tool's terms of service don't conflict with your project's licensing.1
- Licensing and attribution. Track where AI-generated code came from and whether it carries copyright baggage.1
- Accountability. A named human owns the contribution, not the model.1
- Disclosure. Significant AI assistance gets flagged, not hidden.1
- Prior discussion of bulk changes. Large or automated AI-generated changes need sign-off before they land, not after.1
- Confidentiality and privacy. No feeding embargoed or confidential material into tools that transmit it to a third party.1
That's six clauses. It's also, almost verbatim, a policy document.
What does the Linux kernel's AI Coding Assistants policy require?
The kernel's policy is more mechanical, and that's its value. It draws a hard line: AI agents must not add a Signed-off-by tag, because only a human can legally certify the Developer Certificate of Origin.2 Instead, contributions carry an Assisted-by tag identifying the agent and model version, for example "Assisted-by: Claude:claude-3-opus coccinelle sparse."2
The human submitter still has to review the code, confirm license compliance, and take full responsibility for what they submit.2 Linus Torvalds has called outright AI bans "pointless posturing," treating AI as a tool rather than a threat, and the kernel's logic reflects that: hold the human liable, don't police the software.3
That logic exists because of an incident, not a theory. NVIDIA engineer Sasha Levin submitted a fully LLM-written patch to kernel 6.15 without disclosing it, and it shipped a performance regression.3 The Assisted-by tag is the direct fix for that failure mode.
GCC's stricter line: when a project just says no
Not every project wants Debian's nuance or the kernel's tag-and-trust model. GCC adopted a policy in July 2026 that declines any "legally significant" contribution containing or derived from LLM-generated content, using the GNU Project's own threshold of roughly 15 lines of code or text.4 LLM-generated test cases and non-contribution uses like research and bug triage are still fine.4
That's a useful model for high-risk internal codebases: payment systems, authentication, anything touching regulated data. A blanket "no AI-derived changes above a line-count threshold" is blunt, but it's enforceable, and enforceable beats aspirational.
The Linux Foundation's baseline rules for any project
If Debian's policy is thorough and GCC's is strict, the Linux Foundation's org-wide guidance is the floor. It permits AI-generated code across LF-hosted projects but requires contributors to check that the AI tool's terms don't conflict with the open source license and to verify third-party copyright permissions in the output.6 Notably, it explicitly defers to individual employers' stricter policies, acknowledging that a company's internal rules should govern its own developers even when they contribute externally.6
That's the right instinct for any internal policy too: set a floor, let stricter teams go further.
How to translate this into your own internal AI code policy
Here's the framework, assembled from what these four projects already tested in public:
- Require a disclosure tag on every AI-assisted commit. Mirror the kernel's Assisted-by format: agent name and model version, attached at commit time, not retrofitted later.2
- Put a human name on every contribution. No AI agent signs off. A named engineer certifies they reviewed the code and takes responsibility for it, exactly as the kernel's DCO model requires.2
- Check licensing and tooling terms before adoption. Confirm your AI coding tool's terms of service don't grant the vendor rights that conflict with your codebase's license or your client contracts, the same check Debian and the Linux Foundation both require.16
- Set confidentiality rules for prompts. Ban feeding proprietary code, credentials, or customer data into tools that transmit prompts to third parties for training, following Debian's confidentiality clause.1
- Require review before bulk or automated AI changes ship. Large-scale AI-generated refactors or migrations need sign-off before they land, not after, per Debian's prior-discussion rule.1
- Draw a hard line for high-risk code. For your most sensitive systems, consider GCC's approach: reject AI-derived contributions past a defined size threshold outright, rather than trying to review your way to safety.4
Six clauses, each already stress-tested by a project with more contributors and more legal exposure than most enterprises will ever face. Teams building this out from scratch may find it faster to start from the governance rules already laid out in Securing the Code Your AI Wrote, then layer the disclosure-tag mechanics on top. And if the goal is giving employees a sanctioned way to build internal tools instead of quietly running unsanctioned AI code through personal accounts, a platform like Remy gives IT a governed alternative to point shadow builders toward, rather than just a policy to hand them.
What does it cost to skip this?
The IBM numbers aren't subtle. 97% of breached organizations with an AI-related incident lacked proper AI access controls.5 Of organizations that do have an AI governance policy, only 34% actually audit for unsanctioned AI use.5 Having a policy document and having a functioning one are different things, and the gap between them is where breaches happen.
Debian, the Linux kernel, and GCC didn't write these policies because they were bored. They wrote them because ungoverned AI contributions had already caused real problems, disclosed and undisclosed. Your engineering org has the same exposure, just with less public scrutiny and, so far, less pressure to fix it. The blueprint is sitting there, published, argued-over, and free. Adopting it is cheaper than writing your own from scratch, and considerably cheaper than the breach you'll eventually have without one.
At minimum: a disclosure tag identifying AI assistance on commits, a named human accountable for reviewing and certifying each contribution, a check that your AI tool's terms don't conflict with licensing or confidentiality obligations, and mandatory review before bulk AI-generated changes ship.
Most major open-source projects rejected outright bans as impractical. The Linux kernel treats AI as a tool and holds the human contributor accountable instead. GCC is the exception, rejecting legally significant AI-derived contributions above a line-count threshold, which is a reasonable model for your highest-risk codebases only.
It's the Linux kernel's required commit trailer disclosing which AI agent and model version helped write a contribution, paired with a human Signed-off-by tag that carries legal accountability. Companies can adapt the same pattern internally to track where AI assistance touched production code.
IBM's 2025 breach report found 63% of breached organizations lack a finished AI governance policy, only 37% have any way to manage or detect shadow AI, and one in five breached organizations traced the incident to shadow AI use.
Yes, at least for the licensing and tooling-terms clause. Confirming that your AI coding assistant's terms of service don't create IP or confidentiality conflicts is a legal question, and it's one every major open-source project's policy addresses directly.
- 1General Resolution: LLM usage in DebianDebian
- 2AI Coding AssistantsThe Linux Kernel documentation
- 3Linux lays down the law on AI-generated code, says yes to Copilot, no to AI slop, and humans take the fall for mistakesTom's Hardware
- 4GCC steering committee announces AI policyLWN.net
- 5IBM Report: 13% Of Organizations Reported Breaches Of AI Models Or Applications, 97% Of Which Reported Lacking Proper AI Access ControlsIBM Newsroom
- 6Guidance Regarding Use of Generative AI Tools for Open Source Software DevelopmentLinux Foundation



