Technology Law · AI & IP

How to protect software when copyright may be weak

If AI wrote a lot of your code, copyright alone is a shaky moat. Here’s the five-layer protection stack that doesn’t depend on proving who authored every line — in plain English, grounded in South African law.

12 min readMartin Kotze — Attorney

Written by

Martin Kotze

Attorney, Conveyancer & Notary Public

Quick answer

When AI writes a lot of your code, don’t rely on copyright alone — it may be uncertain or absent. Protect the software in five layers: (1) contracts that assign IP in writing and allocate AI & open-source risk; (2) trade secrets & confidentiality over code, prompts and know-how (South African courts protect confidential information as a proprietary interest); (3) source-code escrow and continuity triggers; (4) provenance records — an AI-tools register, a software bill of materials, and commit history showing human edits; and (5) non-code rights — register trademarks early, and use patents or designs selectively. When copyright is doubtful, secrecy plus contract is usually your strongest, most enforceable moat.

Copyright is one brick, not the whole wall. If a court later decides some of your AI-generated code isn’t protected, you want other protections already standing. Here’s how to build them — strongest and cheapest first.

Why copyright alone is risky here

South African copyright in software needs a human author who controlled the making of the code. Where a model produced most of it from light prompts, a court could find there is no qualifying author — and so no copyright to enforce. That’s the warning in Bergh.

1

Contract — your strongest layer

Good contracts work even when copyright doesn’t. Every employee, founder, contractor, agency and reseller should sign an agreement that assigns IP (in writing and signed), allocates open-source and AI risk, warrants the right to use all inputs, and requires records of prompts, tools and edits. And because some code may not be copyright at all, the contract should also hand over the surrounding assets — repository, prompts, configs, documentation and know-how.

2

Trade secrets & confidentiality

South African law protects confidential information and trade secrets as a proprietary interest — and this protection doesn’t care who authored each line of code. For AI software it can cover source code, prompt libraries, model-routing logic, evaluation suites, configurations and operational know-how.

The catch is in the last point: secrecy protection only survives if the information is actually kept secret. Segment repositories, vault secrets, sandbox contractors, restrict and log access and downloads, and keep core AI-development materials separate from general engineering access.

3

Continuity & source-code escrow

If your software is built or hosted by someone else, plan for the day they disappear. Source-code escrow puts the code and build materials with a neutral third party, released to you on defined triggers — supplier insolvency, serious breach, or a failure to maintain the system. The reason this matters for AI software is simple: if ownership is ever disputed, you cannot afford to be locked out of the code while the copyright argument plays out.

Make the escrow pack realistic: source code, build environments, dependency manifests, infrastructure-as-code, keys and rotation procedures, prompt libraries and documentation — everything needed to rebuild and run the system.

4

Provenance & open-source compliance

Records do three jobs at once: they help prove the human control that supports copyright, they give you recourse against suppliers, and they head off licensing surprises in due diligence. Keep an AI-tools register, a software bill of materials (SBOM), and commit-level history showing where AI contributed and what humans changed.

Why open-source matters with AI coding tools

AI assistants can emit code that resembles their training data, which may include open-source under licences like the GPL. Without provenance records and an open-source review, you can unknowingly pull copyleft obligations into proprietary software. A short SBOM and a licence check before release is cheap insurance.

5

Protect what copyright can’t

When the code moat is weak, other rights become more valuable. Trademarks protect your product name and brand — register them early. Patents and registered designs can protect a genuine technical invention or distinctive visual design, but use them selectively.

One caution on patents: South Africa does not run substantive patent examination, which is why it became the first country to grant a patent naming an AI (DABUS) as the inventor in 2021. A granted South African patent therefore hasn’t been tested for validity the way it would be in an examining country — so treat patents as a targeted tool, not a default for software.

A simple decision flow

  1. 1.Is there real human control over the making of the code? If yes, document the authorship evidence and apply the ownership rules (employee → employer; contractor → signed assignment).
  2. 2.If control is thin or unclear, treat copyright as uncertain and shift weight to contract and secrecy.
  3. 3.Lock the chain: signed IP assignments and fallback usage rights from everyone who touched the code.
  4. 4.Record provenance: AI-tools register, SBOM, prompt/edit history; run an open-source and third-party code check.
  5. 5.Secure continuity: trade-secret controls, access controls, and an escrow pack with release triggers.
  6. 6.Add non-code rights: register trademarks; assess patents/designs only where there’s a genuine innovation.

Frequently asked questions

Why can't I just rely on copyright for AI-built software?

Because copyright may be uncertain or absent. SA copyright needs a human author who controlled the making of the code; where a model produced most of it, there may be no qualifying author (see Bergh). Build layers that do not depend on proving authorship.

What is the single most important protection?

Contracts — signed IP assignments (s 22(3)) that also allocate AI and open-source risk and transfer the non-copyright assets (repo, prompts, configs, know-how) so you keep control even if some code is not copyright.

Can I protect source code and prompts as trade secrets?

Yes. SA law protects confidential information and trade secrets as a proprietary interest (Experian v Haynes). It can cover code, prompts, configurations and know-how — but only if you genuinely keep them secret with real access controls.

What is source-code escrow and do I need it?

A neutral third party holds the source and build materials, released to you on triggers like supplier insolvency or breach. For business-critical or vendor-built AI software it is important continuity protection.

Can I patent AI-generated software in South Africa?

Selectively. Patents suit a genuine technical invention, but SA does not do substantive examination (hence the 2021 DABUS grant), so a granted SA patent is untested for validity. Use patents/designs where there is real innovation, and rely on contract, secrecy and branding for the rest.

Sources & authorities

  1. 1.Copyright Act 98 of 1978 — s 22(3) (written assignment), s 20 (moral rights), s 11B (rental) (WIPO Lex)
  2. 2.Bergh and Others v Agricultural Research Council [2020] ZASCA 30; [2020] 2 All SA 637 (SCA)
  3. 3.Experian South Africa (Pty) Ltd v Haynes [2012] ZAGPJHC 105; 2013 (1) SA 135 (GSJ), para 17
  4. 4.CIPC — “What is IP” (patents, trade marks, designs, copyright, trade secrets)
  5. 5.DABUS South African patent grant (formalities-only examination) — IPWatchdog (29 July 2021)

Every authority above was checked against its primary source in June 2026. This page is general information about South African law, not legal advice.

Build a protection stack that holds

We put the contracts, confidentiality, escrow and IP structure in place so your AI-built software is defensible — even where copyright is uncertain.

Why you can trust this: Martin Kotze has been an admitted Attorney of the High Court of South Africa, registered Conveyancer, and Notary Public since 2014, practising from Pretoria. The firm is regulated by the Legal Practice Council under firm registration F17333.

This guide is general information, not legal advice for your specific matter.