CodekeeperTransaction Services

InsightsFounders and sell-side

Is it safe to share source code in due diligence?

Sharing source code in technical due diligence is safe when five questions have clear answers: who sees it, where it is processed, whether it reaches an AI vendor, what is logged, and what happens if the deal does not close. A seller is entitled to ask all five before granting access, and to have the answers in writing.

6 min readUpdated Codekeeper Transaction Services

Why the question is fair

For a software company the source code is the asset being sold. Handing it over before a price is agreed, and before anyone is bound to complete, is an unusual thing to do with an asset.

The risks are concrete. The buyer may be a competitor, or own one. The deal may fail and leave your architecture in someone else's memory. Copies may sit on reviewers' laptops long after the engagement. The code may pass through third-party tools whose terms you have never seen.

Refusing is not the answer either. An investor cannot price what cannot be examined, and a seller who will not show the code is assumed to have a reason. The answer is an arrangement in which the code is examined without being handed over.

A non-disclosure agreement is necessary and not sufficient. It gives you a remedy after something has gone wrong. Technical controls are what stop it going wrong.

Who sees it

Three groups are easily confused: the reviewer, the buyer's deal team and the buyer's engineers.

The deal team needs conclusions, and enough evidence to trust them. That is different from access to the repositories. Where an independent reviewer reads the code and reports to the parties, the buyer's own engineers may never need a copy.

Ask for specifics:

  • The names and employers of the individuals who will have access.
  • Whether they are the reviewer's employees or subcontractors.
  • What each role can see: the report, the evidence for a finding, or the whole repository.
  • Whether anyone can download, and what.

When the buyer is a competitor, sellers commonly limit code access to the independent reviewer, or to a small named group at the buyer who are kept apart from product work for an agreed period.

Where it is processed

Location has three layers: the country, the infrastructure and the machine.

Ask in which region the code will be stored and analyzed. This matters for data protection, and it may matter for commitments you have made to your own customers about where their systems and data are handled.

Ask whether the code is cloned onto individual laptops or stays in a controlled environment. Ask also whether it is built during the review, and if so whether the build environment can reach the internet. Build scripts execute code, and an environment with open outbound access is a route out for whatever is inside it.

Finally, keep control of the connection. Read-only access through a token you issued, limited to named repositories, can be withdrawn by you in a minute. An emailed archive cannot be withdrawn at all. How to set up access is covered in what belongs in a technical data room.

Whether it trains AI

This is a newer question and a reasonable one. Most reviewers now use AI somewhere in their analysis, and it changes the confidentiality picture depending on how.

There are two quite different arrangements. In one, the reviewer runs its analysis inside its own environment and the code never leaves. In the other, portions of your code are sent to an outside AI service. Retention, human review and use for model training then depend on that vendor's terms and on the plan the reviewer happens to have.

Ask directly whether any part of your code or contracts is sent to a third-party AI service, under what terms, and whether it is retained or used for training. The answer you want is that nothing leaves. What these tools can and cannot do is discussed in AI agents in due diligence.

What is logged

A record of access does two jobs. It deters casual browsing, and it gives you evidence if a dispute arises later about who saw what.

A useful log shows every view, every download, every scan and every sign-off, with the person and the time. It should be visible to you, not only to the reviewer or the buyer. A log you cannot read protects someone else.

What happens if the deal fails

Settle this before the review starts, when everyone is still optimistic.

Agree how access ends, what happens to any copies and to derived material such as notes and reports, and who confirms that it has been done. With a live, read-only connection the first part is in your hands: you revoke the token.

Read the agreement for three clauses in particular: the limit on using your information for any purpose other than the transaction, any non-solicitation of your engineers, and any "residuals" clause, which permits the recipient to use what its people retain in memory. This is general information, not legal advice. Terms and their enforceability differ by jurisdiction, and counsel should be consulted.

Custody matters here as well. Where code and transaction materials are held by a neutral party and released only on agreed conditions, a failed deal is simply a condition that was never met. See software escrow in M&A.

One thing does remain with you after a failed process: the findings. You know what the next buyer will find, and you have time to deal with it.

How we approach it

Codekeeper has been the neutral party between software counterparties for over a decade, and holds ISO 27001 certification. We read the code, and both sides read one report in the same words. The seller's position is set out on the founders page.

All analysis runs in Codekeeper's private environment, in the region chosen for the transaction: the EU (Amsterdam), the US (Virginia), or another on request. Nothing is sent to AI vendors and nothing is used for training. Code is cloned, built and scanned in sandboxes with no network egress.

Access is read-only and scoped by role. Every view, download, scan and sign-off is recorded in an audit trail that both sides can see. Code and transaction materials are held in neutral custody and released only on the conditions the parties configured, so no party can move them alone. Details are on the security page and under escrow and the IP Package.

Questions we are asked

Does the buyer receive a copy of our source code during the review?

What each person on the buyer's side can see is set by role, access is read-only, and every view and download appears in the audit trail that you can read. The code itself is held in neutral custody and released only on the conditions both parties configured, such as closing confirmation or dual sign-off.

Do you use AI on our code, and does the code leave your environment?

Our technology reads the code and the contracts inside Codekeeper's private environment, in the region chosen for the transaction. Nothing is sent to AI vendors and nothing is used for training. Builds and scans run in sandboxes with no network egress.

Should we remove secrets from the code before sharing it?

Rotate them, which is worth doing regardless of any transaction. A credential in the history remains exposed to everyone with repository access, and a review will list it. Rotation removes the risk. Editing the history just before a review removes evidence and tends to raise more questions than it settles.

This article is general information for people working on software transactions. It is not legal, financial or insurance advice.

Dealmaking is your craft. The technology is ours.

Tell us about the transaction and its timetable. We will set out the scope we would advise, and what the first report would cover.