attester talking to magistrate in court
Feature

How AI-Generated Code Puts Your Company at Risk

5 minute read
Sharon Fisher avatar
By
SAVED
Think “vibe coding” is saving you time? Think again.

Increasingly, companies use generative AI not just for cartoon images of themselves or email, but actually to generate code, whether it’s the so-called vibe coding or something else. 

But that puts your company at risk due to issues such as copyrightability, ownership of intellectual property, auditability and warranties.

Table of Contents

Why Is AI-Generated Code an Issue?

The problem is that companies often do not know how, where and on what training data the underlying large language model (LLM) was trained, explained Bradlee Frazer, a partner with the Boise-based law firm of Hawley Troxell and chair of the firm’s Intellectual Property & Internet practice group. “The outputted code base may be irreparably full of bugs, errors and infringing content,” he said. “Yes, humans can vet every line of AI code before it is released into the wild, but that flies in the face of the value proposition offered by ‘AI code.’” 

This is particularly an issue for licensed code — a company could get sued for breach of warranty, infringement and negligence for sending out buggy code — but it’s true for internal code as well, Frazer warned. “Internally, the same risks exist: threats of regulatory enforcement (e.g., SEC; FTC), loss of exit deals, loss of investment rounds and higher insurance costs.”

And it gets worse. “If the federal government is a customer of your software company and you ‘license’ AI code to the federal government, you may be in breach of a federal statute, a [Code of Federal Regulations] or a contract because you can warrant neither title to nor functionality of AI-generated code, both of which the federal government requires from inbound licensors,” Frazer explained. “Similarly, if you allow your vendors to use AI code in the performance of tasks for your company, you, not them, will likely get sued for that work product since you are the one who integrated it into your products and distributed it.”

These are not just theoretical issues, but ones that’s cause real companies real problems, Frazer said: 

  • A client complained that a company had copied its code to create a competing product and wanted to sue them for copyright infringement. Because the client’s code was AI-generated, however, the competitor got away with it.
  • Another client was selling its software company, and the buyer was performing due diligence on the assets it wished to acquire. Because the client seller has generated its codebase using AI, it had nothing to sell and had to so inform the buyer. The deal ultimately cratered because the buyer did not want to buy an asset over which it has no downstream control post-close. 
  • Another client called to review an outbound software license a customer wanted it to sign. That is, the customer was dictating the terms of the license by which it would use the client’s code. The license contained “warranties of title” asking the client to warrant that it owned the code it was outlicensing. Because the code was AI-generated, the client could not make those warranties and lost the deal.

Related Article: Vibe Coding Explained: Use Cases, Risks and Developer Guidance

The Question of Copyright

In particular, AI-generated content of any kind — including code — can’t be copyrighted. That’s less of an issue these days, with so much code sold as a service as opposed to being sold as a product, said Anthony Shallat, a practicing startup attorney in San Mateo, California, who recently wrote a thesis for his master’s degree in law from the University of California at Berkeley on the topic. (Ironically, the degree is called an LLM.)

“Copyrighting code used to be in vogue when it was on computers,” Shallat said. While it’s less of an issue now, it’s still important, particularly for startups. “Copyrighting something is important to establish ownership. With SaaS, you don’t need to deliver something so it’s not as important. Intellectual property ownership assumes you own a copyright in what you’re producing.”

Computer programs are one of the many types of creative works that are eligible for copyright protection, according to a representative from the US Copyright Office. “Copyright protects the creative expression embodied in a computer program, not the program’s functionality (which is protected by patent law).” The office has issued a three-part report on copyright law and policy issues raised by AI. 

And don’t think you can fool the Copyright Office. “If material claimed for registration contains more than a de minimis amount of AI-generated content, the claimant is required to disclose the inclusion of AI-generated content in a work submitted for registration, including a brief explanation of the human author’s contributions to the work,” the representative said. “Applicants who do not disclose AI-generated content risk losing the benefits of registration. Applicants affirm that the information on their application is true.”

The Plagiarism Problem With AI-Generated Code

In fact, copyright could end up being a problem the other way, if the AI-generated code infringes on someone else’s copyright. In one widely described incident, David Chisnall, a visiting researcher in the Computer Lab at the University of Cambridge, reported that he’d received a problematic submission to FreeBSD at one point.

“We had an LLM booster try to contribute a big thing to FreeBSD a while ago, the problem?” he wrote. “The only thing in the training data that closely resembled the problem was the Linux kernel. The code was something that a court comparing the two would decide was clearly a derived work of GPL’d code. It turns out that the output of a plagiarism machine may be plagiarism. Who knew?”

“It was a copy, whether it was copied with a chatbot or otherwise,” agreed David Gerard, who runs an AI skeptics’ blog and podcast called Pivot to AI. Consequently, several open source projects, such as the Servo web browser, the QEMU virtual machine and the NetBSD operating system, don’t allow submissions of AI-generated code, he said.

But as AI-generated code becomes more common, less and less software will be copyrightable, which could change the industry, Shallat said. “The theory is all software code is going to be publicly available. If you can’t protect copyright, nobody has any ownership rights at all. In 5-10 years, anyone can steal anyone’s code. The premise is if you don’t have ownership rights, there’s nothing to protect someone from seeing an idea that’s really cool and creating their own.”

Related Article: Vibe Coding: Reimagining Software Development for the Age of Agents

Does That Mean You Can’t Vibe Code?

Make sure that any software you acquire is actually owned by the company selling it, Shallat said. “If it’s a subscription model, fine. You’re receiving a subscription. But if it’s an AI company and produces AI outputs, scrutinize that it’s going to indemnify or warrant the output.”

For code you’re developing or selling, you don’t have to ban AI-generated code altogether, but it’s not a bad idea, experts said.

“It’s all academic until you get sued,” Frazer said. “If you never get sued, you can use AI code all day long! But no one can assume that. Thus, it all boils down to a good AI usage policy that applies to both employees and independent contractors and which is then rigorously enforced. The best (read: most risk-averse) thing to do is forbid the use of any generative AI outputs within the enterprise without prior HR, Legal and CISO review.” 

Learning Opportunities

But that’s unlikely to happen, according to Frazer. “Because AI code has no author or owner, concepts like provenance, authorship, liability and code traceability are essentially meaningless. How was vibe-coded code ‘made?’ No one knows.”

About the Author
Sharon Fisher

Sharon Fisher has written for magazines, newspapers and websites throughout the computer and business industry for more than 40 years and is also the author of "Riding the Internet Highway" as well as chapters in several other books. She holds a bachelor’s degree in computer science from Rensselaer Polytechnic Institute and a master’s degree in public administration from Boise State University. She has been a digital nomad since 2020 and lived in 18 countries so far. Connect with Sharon Fisher:

Main image: Yanukit | Adobe Stock
Featured Research