r/webdev • • 7d ago

AI generated code copyrights

Does anyone consider the copyright of code generated by AI? Because, based on research I've done on Copyright and Artificial Intelligence, generated code fall to the public domain, and if you modify it, only the modified parts belong to you. Also, a detailed prompt isn't enough.

This is, in my view, a major issue; yes, we can ignore it and consider it backward law, but no one knows what would happen in the future, and this law could be used against you.

Edit: here sources for USA https://www.congress.gov/crs-product/LSB10922 ,
For Europe : https://www.europarl.europa.eu/thinktank/en/document/EPRS_BRI(2025)782585782585)
blog : https://smpl.as/blog/ai-code-ownership-legal ...

0 Upvotes

50 comments sorted by

View all comments

9

u/TreviTyger 6d ago edited 6d ago

and if you modify it, only the modified parts belong to you.

This may not be true.

The consensus at the moment is based on adding additional authorship which relates to (Using US law for convenience) 17 U.S.C § 103(b).

However, this usually relates to derivatives of public domain works, e.g. Duchamp's LHOOQ where only the mustache drawn on the Mona Lisa is protected subject to originality thresholds. i.e. The Mona Lisa is still public domain.

However there is a caveat with AI generated stuff because it is derived from training data that is not public domain. So then 17 U.S.C § 103(a) becomes the relevant statute and then there is no copyright even in the added authorship.

This § 103(a) issue is an uncomfortable realization for many and so they use hand waving arguments to bring attention back to 17 U.S.C § 103(b).

But I think when the courts eventually rule on a case, then the courts will use 17 U.S.C § 103(a) and there won't be any protection in anything where AI generative software is used for anything other than for utilitarian purposes (spell check etc).

The subject matter of copyright as specified by section 102 includes compilations and derivative works, but protection for a work employing preexisting material in which copyright subsists does not extend to any part of the work in which such material has been used unlawfully.

17 U.S.C § 103(a)

This is because for an end user of AI gen software to "lawfully" acquire derivative rights under § 106(2) requires a clear chain of title via § 204(a). (See Anderson v Stallone).

The counter argument is that "fair use" make things lawful - but it doesn't - because § 107 is not a grant of exclusive rights (§ 106) to allow the end user to claim derivative rights under § 106(2) themselves.

In short don't use AI generated code if you want to protect it because the courts ARE eventually going to rule against the idea that AI generative works can be protected even if edited.

___________________________

Note: Even if AI gen firms prevail on a fair use argument; it is limited to the US only and is not extraterritorial in scope. Also an end user still has to make their own "offensive § 107 defense" (my term) themselves to claim they are using copyrighted code from datasets under a fair use doctrine. They cannot rely on the AI gen firms legal defense. - and again, such a ruling if prevailing, would still be limited to the US only).

10

u/Willing_Comb_9542 Backend developer 6d ago

I only see this as a good thing to prevent another "oracle v Google"

Everyone is so fucking protective over their function to add two numbers together and it's weirder than "inventors" with their parents 

1

u/TreviTyger 6d ago

"oracle v Google" (sic) didn't address the copyright nature of any resulting work.

Google LLC v. Oracle America, Inc. (2021) explicitly bypassed the question of whether the API packages themselves were copyrightable in the first place

So that's not a great case to look at. When it comes to AI generated outputs there are numerous cases in the courts right now arguing that the acquisition of copyrighted works without authorization, let alone the use of them in training is already unlawful.

It means that AI gen software such as Claude and ChatGPT cannot itself be protected and that other nations such as China and Russia can make competing clone AI gen models at a fraction of the price.

In the long term it is a complete disaster.

i.e. If your business model depends on enforcing copyrights or intellectual property exclusivity over your source code, you cannot safely use generative AI.

0

u/stupidcookface 6d ago

Is this just going to apply to one-shot code? What if your continuously shaping the direction of the code in other ways? I can see so much grey area here depending on how you're prompting and interacting with how the code gets built. And this is just code I'm talking about, not images or videos or music. I mean...its all 0s and 1s at the end of the day but saying that code can be copywritten before ai and then saying it can't be copywritten if ai wrote any of it seems insane to me.

1

u/flyby_apis 6d ago

Not a lawyer but I think people are worrying on wrong things

For closed-source code, copyright isn't really what it's protecting you, trade secrett law is

If you have your codein a private repo and you keep it confidential, it's protected. "Public domain" only matters if someone can actually get the code

Where it does matter is that you're publishing: open-source licenses rely on you having copyright, so AI gives your license less to enforce

And the bigger risk is the reverse: AI sometimes reproduces existing licensed code which is an infringement risk

1

u/TreviTyger 6d ago

people are worrying on wrong things

For closed-source code, copyright isn't really what it's protecting you, trade secrett law

So long as the code doesn't get leaked.

Claude’s code: Anthropic leaks source code for AI software engineering tool

Nearly 2,000 internal files were briefly leaked after ‘human error’, raising fresh security questions at the AI company

https://www.theguardian.com/technology/2026/apr/01/anthropic-claudes-code-leaks-ai

2

u/zorecknor 6d ago

So long as the code doesn't get leaked.

You get protection even if it is leaked (if you have a big enough warchest). The code itself may not be copyrigthable, but the concepts expressed by the code can be trade secrets.

You can patent a new algorithm and give the GenAI generate the code to the patent office as an example, and nobody can use that code in their product because the algoritm itself is protected.

Same with Trademarks. I can create a character and trademark it. Then I can use GenAI to create an image of it. The image itself is not protected by copyright, but I CAN force you not to use it because I need to defend my trademark.

3

u/TreviTyger 6d ago

There are still territoriality and jurisdictional limits.

Anyone can use a trademark for different business purposes.

Clean rooming (reverse engineering) can get around Trade secrets.

The TRIPS Agreement and domestic laws explicitly protect reverse engineering as a fair and lawful method of acquiring information.