AI Code License Contamination

AI Code License Contamination

The assistant wrote it. Someone else owns it.

What Is AI Code License Contamination?

An AI assistant can reproduce code it learned from word for word, licence and all, and the company that ships it carries the obligation. Here a routine an assistant wrote weeks ago turns out to be copied from a copyleft project. You'll trace it through the provenance gutter, compare it with the upstream source, replace it with your own implementation, prove the fix with a snippet licence scan, and record where your code comes from.

What You'll Learn in AI Code License Contamination

AI Code License Contamination — Training Steps

  1. A notice from counsel

    Alice leads the SDK team at Undercott. The Telemetry SDK is a closed library that Undercott hands to customers inside their own devices. This morning Ilse, Undercott's counsel, forwarded an outside notice about it.

  2. Open the SDK

    The notice points at the bit-packing routine in src/bitpack.c of the SDK repository, ~/work/undercott-sdk . In the gutter, violet dashed lines are code an assistant wrote that nobody has reviewed.

  3. Accepted, never read

    Weeks ago, Alice asked Claude for a fast routine to pack sensor readings into 64-bit words. Claude produced one, it passed the tests, and she accepted it. It shipped in 4.2.

  4. Read the block

    Review the block the way you would a colleague's change, and look for anything that does not read like the rest of the codebase.

  5. The upstream source

    The notice names the upstream file: Crumbfold's src/bitpack.c , on the Githarrow code forge.

  6. Line for line

    Compare the upstream routine with the block in the SDK beside it.

  7. What the licence asks

    The file carries a licence. Githarrow summarises it behind the licence badge, and the file's own header states it.

  8. Whose problem it is

  9. Scan it like a release would

    A snippet scanner fingerprints the source and compares it against open-source code, the check that would have caught this before 4.2 shipped.

  10. Write it yourself

    Renaming the variables would hide the copy, not remove it. The fix is a routine Alice writes herself, from the task rather than from Crumbfold's code.

Security Framework Coverage

OWASP Top 10

  • A03:2025 Software Supply Chain Failures

CWE

  • CWE-1395 Dependency on Vulnerable Third-Party Component

CIS Controls

  • CIS 16 Application Software Security
  • CIS 2 Inventory and Control of Software Assets

NIST CSF

  • PR.AT-02 Individuals in specialized roles are provided with awareness and training so that they possess the knowledge and skills to perform relevant tasks with cybersecurity risks in mind
  • PR.PS Platform Security
  • ID.AM Asset Management