Skip to content

The Drift Log · Provenance, licensing and the paper trail

Validating Copyleft Boundaries in Multi-Package Repositories

23 November 2026 · 3 min read · 658 words · established

A wax seal resting on a page of hash digests

Monorepo workspace links let copyleft dependencies leak into proprietary binaries across unmonitored internal package boundaries.

A monorepo workspace gives developers the illusion of firewalls between internal packages. A utility package (packages/utils) imports a fast diffing library to format test output. Six months later, a customer-facing proprietary service (packages/api) imports a string helper from packages/utils. The build succeeds. The bundler tree-shakes the code. The resulting binary now contains a statically linked, GPL-3.0-licensed dependency.

The failure did not happen at the build step or in production. It happened when a permissive package crossed an unmonitored copyleft boundary inside the workspace graph.

The Transitive Bleed in Workspace Graphs

Modern package managers resolve workspace links as symlinks or direct file paths. Tooling treats @company/utils as a local folder, but the build graph treats it as an unmediated dependency node.

When license scanners run only at the repository root or on individual sub-packages in isolation, they produce false confidence:

  1. Root-level scans flatten context. A root scan sees a copyleft dependency, but flags it as low risk because the root manifest is marked private and non-distributed.
  2. Sub-package scans miss transitive workspace dependencies. A scan inside packages/api inspects its immediate package.json or Cargo.toml. It sees internal workspace pointers, but does not traverse the dependency trees of those workspace siblings to evaluate their upstream licenses.
  3. Bundlers pull what they need. If a shared package imports both MIT and copyleft components, bundlers will package whatever the import graph touches. If code isolation relies on developer discipline rather than graph assertions, viral licensing leaks into proprietary artifacts.

A folder of vendored code or a flat list of approved dependencies is not a compliance strategy. If your software provenance records do not model the exact edge paths from release binaries back through workspace boundaries, copyleft obligations are leaking into your closed-source builds.

Enforcing Copyleft Boundaries

Preventing copyleft contamination in a monorepo requires treating license compliance as a graph traversal problem rather than a metadata check.

Every package in a workspace must declare its distribution intent:

  • Proprietary / Closed: Distributed to customers; must reject copyleft dependencies (GPL, AGPL, and statically linked LGPL).
  • Internal Only: Never leaves company infrastructure; can permit copyleft internal tooling.
  • Permissive Open Source: Published externally; requires strict MIT, Apache-2.0, or BSD compatibility.
packages/core (Proprietary Target)
  └── packages/telemetry (Internal Workspace)
        └── vendor/fast-diff (GPL-3.0)  <-- Boundary Violation: Build Fails

When building a proprietary target, the dependency resolution engine must compute the transitive closure of all workspace packages and external dependencies. If a path exists from a proprietary root to a copyleft node, the build must fail before compilation or packaging begins.

As detailed in Provenance-First Build Intent: Licensing Invariants Before Disk Writes, licensing rules must function as hard invariants within your build pipeline. Waiting until after binary linking to inspect an SBOM turns compliance into remediation rather than prevention.

The SHPBL Approach

SHPBL eliminates licensing ambiguity at ingestion. Our capability catalog is model-independent and computed rather than generated. Every component ingested into our pipeline passes a Build Intent gate where licensing invariants and provenance are verified in code before an artifact is written to disk.

Artifacts are repeatable, and releases are sealed by published archive checksums verified against our root of trust. You can run a free repository evaluation to inspect your codebase and surface licensing boundary risks across internal workspace graphs.

An Actionable Monorepo Audit

Do not wait for a formal audit or an M&A diligence checklist to map your monorepo licensing posture.

  1. Generate target-specific dependency graphs. Stop scanning the repository root. Run dependency graph exports specifically for each deployable artifact.
  2. Flag workspace hops. Write a CI check that inspects the license metadata of every transitive dependency pulled in via workspace references.
  3. Assert license invariants in CI. If a target is marked private and proprietary, enforce an explicit blocklist (e.g., GPL-*, AGPL-*, SSPL) across its entire resolved dependency tree.

If your build pipeline allows a workspace package to silently route copyleft code into a proprietary artifact, your boundary exists only on paper. Enforce it at the dependency graph level.

This post supports the longer argument in Provenance-First Build Intent: Licensing Invariants Before Disk Writes.

Keep reading

Next in the log

The Strategic Master Library · written and reviewed under the house's own epistemic rules: nothing claimed that we cannot show.