Safeguard
Supply Chain•

Should an agency fork an open source package for a client?

Forking an open source package gives control and creates a maintenance duty. A decision guide for agencies: when to fork, patch, wait or replace.

Safeguard Security Team
3 min read

Fork only when you need a change upstream will not make soon, and only if someone will keep the fork patched. A fork gives control and removes the maintainer's future fixes unless you merge them. Try an update, an override, a contribution upstream or a replacement first.

What a fork really is

A fork is a copy you now maintain. The upstream project keeps publishing releases and security fixes. Your copy gets none of them unless you pull them in. For a client, that means a dependency that looks maintained but is not.

Decision guide

SituationBetter first move
Bug with a fix merged upstream but not releasedWait for release, or pin a commit as a temporary step
Bug with a fix proposed upstream, not mergedOffer help; test the proposed patch
Vulnerability in a transitive packageOverride to a fixed version
Maintainer unresponsive, project abandonedFork or replace
Feature the maintainers will not acceptFork, if the feature is vital
One small local tweakPatch at build time with a documented patch file

If you do fork

  1. Fork under the client's organization, or agree where it lives and who owns it.
  2. Record why, what changed and the upstream commit you branched from.
  3. Keep the diff small. Large diffs make merging upstream changes painful.
  4. Publish under a clearly different package name or reference the repository directly, so nobody confuses it with the original.
  5. Set a review cadence to pull in upstream releases and advisories.
  6. Add the fork to the dependency inventory with a note that it is not the upstream package.
  7. Keep the license file and notices intact.
  8. Name an owner and an end date or exit plan.

The hidden costs

Security tools identify packages by name and version. A fork under a new name may not match any advisory, so scanners can go quiet while the code stays vulnerable. A fork under the old name on a private registry has the opposite risk, confusing resolution. Either way, you must watch upstream advisories by hand.

You also take on build, testing and release work that the original maintainer did for free.

Contributing back

If a change is generally useful, send it upstream. Upstream acceptance removes the maintenance burden. Even a rejected pull request leaves a public record that explains your patch to the next developer.

At handover

A fork is something the client inherits. Say so in the handover pack. Explain where it lives, what it changes, and who updates it. If you cannot commit to maintaining it, say that too, and recommend an exit.

Quick check

Is pinning a git commit the same as forking?

No. Pinning uses upstream code at a specific commit. You still depend on the upstream repository staying available, so track it.

Should the fork go on a public registry?

Usually keep it private or reference the repository. Publishing a fork publicly makes you a maintainer to everyone who installs it.

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.