Code Assistants and Open-Source Licences

AI code assistants write functions, tests and entire modules. For software companies and development departments, this raises questions about copyright in the generated code, licence obligations arising from adopted open-source fragments and the protection of their own source code. This page provides an overview and shows how use can be organised in a legally compliant way.

Protection of the generated code

Computer programs are protected under Sections 69a et seq. Copyright Act if they are the author’s own intellectual creation. Code generated by an assistant without significant human input often does not reach this threshold. In practice, however, software is created through an interplay of suggestions, selection, adaptation and integration; the overall program with its human-designed parts is then usually protected. For customer contracts, this means that commitments to “transfer all rights” should be worded precisely.

Licence risks from adopted fragments

Assistants may suggest code sections that come almost verbatim from public repositories. If the original code is subject to a copyleft licence such as the GPL, obligations to disclose your own code or to provide licence notices may arise.

  • Activate the providers’ filter functions for suggestions that match public code.
  • Integrate software composition analysis into the build pipeline.
  • Code review with an eye on conspicuously long, uncommented suggestions.
  • Check providers’ indemnity commitments; they usually only apply when filters are activated.

Protection of your own source code

Code assistants send context from the development environment to the provider. This concerns your own source code, credentials in configuration files and customers’ code. Business plans without training use, exclusion lists for sensitive repositories and contractual consent from customers where their code is affected are required.

Open-source models in your own product

Anyone who integrates an openly available model into their product must check the model licence. In addition to classic open-source licences, there are model licences with usage restrictions, obligations to pass on the terms or thresholds for companies with very large numbers of users. The AI Act provides relief for certain open-source models, but this does not apply to high-risk systems and GPAI models with systemic risk.

Practical Legal Examples

GPL fragment in a commercial product

During a scan before a release, a software company finds a code block suggested by an assistant that largely corresponds to a GPL-licensed library. We assessed whether the block is protectable and whether the copyleft obligations would be triggered, and supported its replacement with an in-house implementation. Since then, the filter for public code has been mandatory.

Client demands a declaration on the use of AI

In a development contract, a client demands an assurance that no AI-generated code will be used. This is hardly achievable for the software company. We negotiated a clause that permits the use of approved assistants subject to review and scanning obligations and adapts the transfer of rights to the legal position.

Credentials transmitted to the provider

A developer works with an assistant in a repository containing credentials for customer systems. We assessed the incident under data protection and contract law, arranged for the credentials to be rotated and introduced exclusion rules for sensitive files as well as secret scanning.

Own product based on an open model

A start-up builds a sector solution on a freely available language model. The model licence requires an acceptable use policy to be passed on to end customers and prohibits certain uses. We incorporated the obligations into the company’s own customer terms and determined its role under the AI Act.

How we support you

  • Policies for code assistants in development teams.
  • Open-source compliance and review of model licences.
  • Drafting development and licence agreements with AI clauses.
  • Assessment of licence infringements and defence against claims.

Frequently asked questions

Does AI-generated code belong to the provider of the assistant?

The major providers do not claim any rights in the output in their business terms. Whether copyright exists at all depends on the extent of human creative input.

Does AI-generated code have to be labelled?

There is no statutory obligation. Disclosure may be agreed contractually; internal documentation is advisable.

Are open-source models exempt from the AI Act?

Only in part. The exemptions do not apply to high-risk systems, prohibited practices, transparency obligations and GPAI models with systemic risk.

Related topics

Do your developers use AI assistants?

We design rules, contracts and review processes so that your code remains clean in terms of licensing and protected.

Scroll to Top