By system

Licensing your GitHub code and repositories to AI companies

Quick answer

You can license code you own. GitHub's terms say you own your content, so the question is what in your repositories is really yours: client work and open-source dependencies may not be. Commit history, pull request reviews and issues linked to code are usually what makes a repository interesting. Scan for secrets and customer data before anything leaves your systems.

You own it
GitHub's terms on your content
$50K–$500K
Mercor's published range for software companies
History
commits, reviews and issues add the context
Secrets
scan the whole history, not just the latest commit

01What GitHub's terms say

The GitHub Terms of Service are short on this: "You own Your Content." You give GitHub a licence to store and process it so the service can run, and for public repositories you also give other users certain rights. Neither changes who owns your code.

The same section puts the risk on you. If you post material you didn't create, you must have the right to post it. That's the point to carry into a data licence: being able to see code in your repository doesn't mean you can license it.

Where these records usually live

Code hosting

  • GitHub
  • GitLab
  • Bitbucket

Examples of common tools, to help you find your records. Product names and logos belong to their owners; no affiliation or endorsement.

02What's in a repository, and what isn't yours

Work through a repository as layers.

LayerWhose is it?What to do
Code your employees wroteUsually the company'sIn scope, subject to your contracts
Code contractors wroteYours only if assignedCheck the contract
Code built for clientsOften the client'sRead the statement of work
Vendored or copied open sourceUnder its own licenceExclude it, and keep its notices
Contributions to a project you runUnder the project's licence or CLARead it first

Open source needs particular care. GitHub's terms note that code added to a licensed repository is licensed "under the same terms" unless a contributor agreement says otherwise. A dependency folder or a copied file doesn't become yours by sitting in your repository, and many licences carry conditions on redistribution.

03Why history matters more than the code

Finished code is the least interesting thing in a repository. The record of how it got there shows how engineers actually work: commits, pull request reviews, linked issues, failed builds, reverted changes.

Programmes name code among what they want. micro1 lists code among the operating records it licenses. Mercor has a listing for software companies at a published $50K–$500K, and a separate one for SaaS companies at $55K–$350K. If your Jira or ticket history links to commits, say so when you apply. See the software industry page for more on what programmes ask.

Software companies: usually licensable (Repos you own, with commit history; Code reviews and design docs; Tickets linked to commits; Post-mortems and runbooks) versus check first or leave out (Code your clients own; Secrets in history (scan and rotate); Customer data in fixtures and dumps; Third-party code you can’t vouch for).Usually licensableRepos you own, with commit historyCode reviews and design docsTickets linked to commitsPost-mortems and runbooksCheck first, or leave outCode your clients ownSecrets in history (scan and rotate)Customer data in fixtures and dumpsThird-party code you can’t vouch for
A starting point for scoping, not a legal test.

04Clean it before you share it

Repositories hold more than code, and deleted files survive in history. Before any copy leaves your systems:

  1. Scan the full history for secrets. Use a tool such as gitleaks or GitHub's secret scanning. Removing a key from the latest commit doesn't remove it from the past.
  2. Rotate anything you find. Assume an exposed credential is compromised, even if you've rewritten history.
  3. Look for customer data in fixtures, test databases, logs and SQL dumps.
  4. Check issues and pull requests for names, opinions about colleagues, and client details. Commit metadata also carries staff names and email addresses, which are personal data.
  5. Remove security findings and anything that describes an unpatched weakness.

05How to give access

Ask the programme how it receives code. A private export of agreed repositories, as a one-off copy, keeps you in control. Be wary of granting a third-party app standing access to your whole GitHub organisation, and check any terms that apply to that app. Give the least access that does the job, and take it away afterwards.

Keep a list of exactly which repositories and commit ranges went out, so you can answer a buyer's questions later.

06Questions people ask

Does GitHub's own licence stop me licensing my code to someone else?

No. The licence you give GitHub lets it run the service. It doesn't take your ownership away.

Can I license a public repository?

Public code is already available under its own licence, so there's little to sell. Private repositories with history are what programmes describe.

What about code written by contractors?

It's yours only if the contract assigns it. See who owns the data.

Sources

Our links to these programmes carry our referral code, so the programme can see the introduction came from us. The programme may pay us a referral fee, and you pay nothing.

Check which programmes you’re likely to matchA few short questions, about a minute. Free, no sign-up. The programme decides who qualifies.trackimpact.io/data →