Skip to content

Rights and contracts

Private repo customer code boundary: first-party vs customer-owned code

By SourceX Editorial · Reviewed by Noah Loul ·

9 sections

Short answer

Licensing review should classify each repository path by who owns it and under which agreement, not by who hosts it or last edited it. Code employees wrote within their duties is usually first-party. Code a customer wrote, supplied for support, or commissioned under a contract assigning the deliverables to them stays customer-owned unless a signed agreement says otherwise. Mixed and unknown paths wait for counsel.

License terms

Private repo customer code

This page covers private repo customer code boundary: first-party vs customer-owned code.Illustrative

Key takeaways

  • Repository access, commit rights and hosting say nothing about ownership; the governing agreement for each path does.
  • Under U.S. law, code an employee writes within the scope of the job is a work made for hire owned by the employer; contractor code needs a written agreement.
  • Services deliverables, customer-supplied scripts and mirrored customer forks are the usual places customer-owned code hides inside a vendor's private repos.
  • git blame and CODEOWNERS show who last touched or reviews a line, not who owns it, so treat them as leads for the worksheet rather than answers.
  • Unknown is a class of its own: a path whose agreement cannot be found stays out of the licensed set until counsel resolves it.
  • Record the classification at a pinned commit so a second reviewer can rerun it and reach the same boundary.

Why hosting a customer's code does not make it yours to license

Holding code in your private repository gives you possession, not ownership, so the boundary has to be drawn from agreements rather than from where files sit. A vendor's repos routinely contain code it did not create: integrations built for a customer, scripts a customer sent to reproduce a bug, a mirrored fork of a customer's plugin.

GitHub's own terms put it plainly: you own the content you create, and if you post content you did not create, you are responsible for having the right to post it. GitHub's licensing guidance adds that code published without a license stays under default copyright, with the owner keeping the rights to reproduce, distribute and make derivative works. Both points cut against any assumption that whatever sits in your organization account is yours to license.

Keep four questions apart throughout the review. Access is who can read the repo. Privacy permission is whether personal data in the code or fixtures may be used. Ownership is who holds the copyright. Contractual licensing rights are what the agreements allow you to grant a third party, and an owner can still have promised not to share. A path can pass one test and fail another.

Which code is first-party, and which belongs to a customer?

First-party code is code your company owns outright, usually because employees wrote it as part of their jobs or contractors assigned it to you in writing. Under 17 U.S.C. 201(b), for a work made for hire the employer, or the person for whom the work was prepared, is treated as the author and owns the rights unless a signed written instrument says otherwise.

The Copyright Office's Circular 30 describes two routes to that status: work an employee creates as part of regular duties, and certain commissioned works where the parties sign a written agreement expressly calling it a work made for hire and the work falls in an eligible category. Status depends on the facts when the code was written, so a later contract rarely fixes an old gap. Contractor code therefore usually rests on an assignment clause, and the worksheet has to find it. Outside the United States the rules differ, which is one reason counsel signs off on the classes.

Customer-owned code is the mirror image: code the customer wrote, code you wrote for the customer under terms assigning it to them, and material the customer supplied for a specific purpose such as support. The table maps the usual sources to a default class.

Which code is first-party, and which belongs to a customer?
Where the code came fromDefault classWhat flips the default
Core product written by employeesFirst-partyEmployee hired under a contract that carves out ownership, or work done outside job duties
Contractor or agency commits to the productUnknown until the assignment is foundA signed assignment or a valid work made for hire agreement moves it to first-party
Custom integration built under a customer statement of workCustomer-owned if the agreement assigns deliverablesA clause keeping vendor ownership with a license to the customer moves it to first-party
Scripts, SQL or configs a customer sent to supportCustomer-owned and confidentialAlmost nothing; exclude unless the customer grants rights in writing
Mirrored or forked customer repositoryCustomer-ownedYour own later commits may be first-party, but only at line level and only if separable
Shared module touched by both teamsMixedLine-level split by author and agreement, or exclusion of the whole module

The repository source and rights classification worksheet

The worksheet records one row per path or glob at a pinned commit, with the evidence that settles each field and the condition that stops the path. Fill it from the agreements first and the commit history second; history tells you where to look, and agreements tell you what you found.

  • Rule 1: classify by agreement, never by repository location or commit access.
  • Rule 2: an outside author with no agreement on file makes the path unknown, not first-party.
  • Rule 3: a customer-owned file stays customer-owned after your engineers edit it, unless the agreement gives you those edits.
  • Rule 4: mixed paths are split at line level only when the split builds and tests cleanly; otherwise the whole path is held.
  • Rule 5: confidentiality or use restrictions exclude a path even when you own the copyright in it.
  • Rule 6: every hold names the document that would release it.
The repository source and rights classification worksheet
FieldWhat to recordEvidence that settles itStop if
Path and commitDirectory or glob plus the commit SHA the review usedRepository URL and SHA in the worksheet headerThe path moved or was renamed after the pinned commit
OriginEmployee, contractor, customer, vendor, open source or generatedCommit identities mapped through .mailmap, email domains, ticket linksOrigin rests on a guess about an unmapped email address
Governing agreementEmployment, contractor assignment, customer MSA and SOW, contribution termsAgreement title, version and date, held by legalNo agreement found for an outside author
Ownership classFirst-party, customer-owned, mixed, licensed-in or unknownThe clause that decides it, quoted by section numberClass is mixed and cannot be split cleanly
Customer identifiersNames, tenant IDs, hostnames, keys or real records in fixturesSecret and identifier scan output for the pathCredentials or live customer records are present
Confidentiality dutyWhether a customer agreement treats this material as confidentialConfidentiality clause and its definition of customer materialsMaterial is defined as the customer's confidential information
Use restrictionAny clause limiting use to providing the service or barring AI trainingData-use or permitted-purpose clauseUse is limited to serving that customer
Open source statusLicense expression if licensed-inSPDX or REUSE headers, license filesLicense terms not yet reviewed
DecisionInclude, exclude, redact or hold for counselReviewer's reasoning in one sentenceDecision lacks a named reviewer
Reviewer and dateEngineering reviewer and rights reviewer, with datesSign-off in the worksheetOnly one role signed

What do commit history and CODEOWNERS prove, and where do they mislead?

Commit history shows who changed lines and when; it does not show who owns them. The git blame documentation describes the command as annotating each line with the revision that last modified it, and notes that the report says nothing about lines that were deleted or replaced. A customer's original file reformatted by your engineer will blame to your engineer.

Blame follows whole-file renames automatically, and the -M and -C options follow lines moved or copied between files, which matters when customer code was pasted into a shared utility. Use the .mailmap file to map the many addresses one person committed under to a single identity before you count authors; the git documentation describes exactly that mapping to canonical names and emails.

CODEOWNERS is a review-routing file. GitHub's documentation describes it as defining the individuals or teams responsible for code, assigned per branch, and listed owners need write access to the repository. A customer engineer listed there is a strong lead that the path has customer authorship; your team listed there proves nothing about who owns the code.

Once the worksheet is settled, record the result where it travels with the files. The REUSE specification puts SPDX-FileCopyrightText and SPDX-License-Identifier tags in each file header, or applies them to groups of files through REUSE.toml, which gives a later reviewer a machine-readable trail instead of a spreadsheet that drifts.

Which contract clauses move a path across the boundary?

The customer agreement decides most boundary cases, and a handful of clause types do the work. The table describes how each typically affects classification; it is general information, and counsel reads the actual wording.

Which contract clauses move a path across the boundary?
ClauseWhat it typically coversEffect on the boundaryQuestion for counsel
Deliverables assignmentOwnership of work product created under a statement of workAssigned deliverables become customer-ownedDoes assignment happen on creation, on acceptance or on payment?
Pre-existing or background IPVendor tools and libraries brought into the projectCarved-out components stay first-partyIs there a list or schedule naming the carved-out components?
License-back to vendorVendor's right to reuse assigned deliverablesPermits internal reuse but rarely sublicensing to third partiesDoes the license allow sublicensing or AI training?
Confidential informationCustomer materials, specifications and source supplied to the vendorExcludes the material regardless of who owns copyrightDoes the definition cover code and scripts sent to support?
Data use or permitted purposeLimits on using customer materials beyond providing the serviceCan bar training use of anything derived from customer materialsDoes the limit reach code, or only customer data?
Return or destruction on terminationWhat happens to customer materials when the contract endsMaterials that should already be deleted cannot be licensedDid a past termination trigger a deletion duty that was missed?

Illustrative scenario: an integrations monorepo with three kinds of owner

This scenario is illustrative; the company, repository and counts are invented to show how the worksheet behaves. A vendor of field-service software keeps one private monorepo with four top-level areas and about 1,200 files at the pinned commit.

The core directory, about 70 percent of files, was written by employees; the worksheet marks it first-party after legal confirms the standard employment agreement. The connectors area holds a custom ERP integration built for one customer under a statement of work whose deliverables clause assigns ownership to the customer; those 90 files are customer-owned, while a shared HTTP client inside it is listed as background IP in the SOW schedule and stays first-party.

The support area holds 40 customer-sent SQL scripts and one anonymized-looking fixture that the identifier scan shows contains real hostnames. All of it is excluded as customer-owned and confidential. The shared utilities directory is mixed: blame with -C shows about a fifth of its lines were pasted from the customer connector. The split does not build without those lines, so the whole directory goes on hold, naming the SOW clause counsel must read to release it.

Result: a little over 70 percent of files are licensable first-party, the rest is excluded or held, and every hold names its releasing document. The exception worth noting is the background IP carve-out, which kept a first-party component inside a customer-owned folder.

Which reading of the customer agreement moves the most paths, and how do you show the doubt?

The assumption that moves the most paths is when ownership transfers under the customer agreement. If deliverables pass to the customer on creation, every commit to that integration belongs to them; if they pass on acceptance or payment, work-in-progress branches and abandoned prototypes may still be first-party. Record which reading the worksheet used, and rerun the counts under the other reading so the reviewer sees the swing.

Show uncertainty as counts, not adjectives. Report files and lines per class, the share in unknown and held, and how many outside authors have no agreement on file. A boundary with a small unknown share and named releasing documents is reviewable; one with a large unknown share needs more legal work before anyone discusses licensing.

Treat confidence per row as high, medium or low, tied to evidence: a quoted clause is high, a mapped email domain without an agreement is low. Low-confidence rows never default to first-party.

Will the first-party set still build once customer paths are removed?

A second reviewer should be able to reproduce both the classification and a working build of what remains. Licensed code sets are often used for engineering tasks that need tests to run, so removing customer modules can break the evidence chain from requirement to patch to passing test.

  • Pin the repository URL and commit SHA in the worksheet header, and keep the .mailmap and any blame ignore-revs file used.
  • Store the exact commands that produced author counts, including blame options such as -M and -C.
  • Have the second reviewer sample rows from every class, with extra weight on mixed and unknown rows, and log disagreements.
  • Build the first-party set alone and run its test suite; record which tests fail because an excluded path was a dependency.
  • Check that tickets, review comments and deployment records attached to included code do not quote excluded customer code.
  • Re-run the identifier and secret scan on the final set, not only on the source repo.

Taking a first-party code set into a licensing review

A finished worksheet turns a vague question about whether the repos can be licensed into a defined first-party set with named exclusions, which is what a rights review needs to start. Software companies can take that set to SourceX, which handles sourcing, rights review, contracting, preparation and delivery when a business licenses selected records, code included, to AI developers.

Qualifying begins with a short questionnaire about the company, and no repository is shared for it. If a deal follows, the company approves the scope, exclusions and terms and signs before any code leaves its control, so customer-owned paths never need to be shared to be ruled out.

Frequently asked questions

Who owns code a vendor writes for a customer?

It depends on the agreement. Many services contracts assign deliverables to the customer while the vendor keeps its pre-existing tools, and some keep vendor ownership and license the result to the customer. Read the deliverables and background IP clauses for the specific project before classifying the code.

Does editing a customer's file make the edits first-party?

Not automatically. Your engineer's changes to a customer-owned file may be assigned to the customer under the same agreement, and even when they are yours they are usually inseparable from the customer's lines. Treat the file as customer-owned or mixed until counsel confirms otherwise.

Can git history alone prove who owns a repository path?

No. git blame shows the revision that last modified each line, not who owns it, and it says nothing about deleted or replaced lines. Use history to find outside authors and moved code, then settle ownership from agreements.

Is contractor code first-party?

Only when a signed agreement gives it to you, usually an assignment clause. Under U.S. law, commissioned work counts as work made for hire only in listed categories and with a signed written agreement that says so, so an assignment is the safer thing to look for.

What should we do with paths we cannot classify?

Mark them unknown, exclude them from the licensed set, and name the document that would release each one, such as a missing contractor assignment or SOW schedule. Report the unknown share as a count so reviewers can see how much of the repository is still unresolved.

Sources

  • GitHub's terms say users own the content they create and must have the right to post content they did not create. Source
  • GitHub explains that code without a license stays under default copyright, with the owner keeping all rights. Source
  • CODEOWNERS defines the people or teams responsible for code, per branch, and owners need write access. Source
  • git blame annotates lines with the revision that last modified them and does not report deleted or replaced lines; -M and -C follow moved and copied lines. Source
  • A .mailmap file maps author and committer identities to canonical names and email addresses. Source
  • 17 U.S.C. 201(b) makes the employer or commissioning person the author and owner of a work made for hire unless a signed writing says otherwise. Source
  • The Copyright Office describes the employee and commissioned-work routes to work made for hire status and says status is set by the facts at creation. Source
  • The REUSE specification records copyright and license per file with SPDX tags, or for groups of files through REUSE.toml. Source

See if your company qualifies

A short company assessment. No data uploads are needed.

See if your company qualifies