Skip to content

maintenance third party notices

github-actions[bot] edited this page Nov 19, 2026 · 1 revision

Third-party license notices

Steiner ships Go binaries that carry their dependencies inside the executable, so the licenses of every third-party module those binaries contain travel with the product. THIRD_PARTY_NOTICES.md at the repository root records each linked module, the licenses detected in it, and the verbatim license and notice text. The file is generated by cmd/gen-third-party-notices, with the scanning logic in internal/licensescan. make notices rewrites the file, make notices-check fails when the committed copy is stale, and .github/workflows/release.yml publishes it as a release asset.

What ships

.github/workflows/build-binaries.yml builds ./cmd/steiner for five targets:

  • linux/amd64 and linux/arm64, built with CGO_ENABLED=0 and compressed with UPX.
  • darwin/amd64 and darwin/arm64, cross-compiled from linux and shipped uncompressed.
  • windows/amd64, compressed with UPX.

All five carry their dependencies inside the executable rather than loading them from shared libraries, so binary distribution carries the licensing obligations of the whole dependency graph, not just of the packages Steiner calls directly.

The linked dependency graph covers every module the five builds link, direct and transitive. Some link on one platform only: github.com/inconshreveable/mousetrap on windows, github.com/esiqveland/notify and github.com/godbus/dbus/v5 on linux. The inventory is a union across the build matrix, so those are inventoried even on a linux development machine.

Steiner does not distribute:

  • the Go toolchain, UPX, or any other build tooling;
  • external services the binaries call;
  • MCP and LSP servers, which users install and run separately.

Distribution obligations

The notices exist because those licenses condition binary redistribution:

License family Condition
MIT, MIT-0, ISC-style The copyright notice and permission text must accompany the binary.
BSD-2-Clause Binary redistribution must reproduce the copyright notice, the conditions, and the disclaimer.
BSD-3-Clause As BSD-2-Clause, plus the no-endorsement clause.
Apache-2.0 Section 4 requires recipients to receive a copy of the License, and NOTICE files shipped by the dependency to be propagated.
Go standard library and runtime BSD-3-Clause, whose notice must be reproduced.

Linked modules that ship NOTICE files, such as gopkg.in/yaml.v3 and github.com/luispabon/ctok-go, have them reproduced in the inventory; the same applies to the PATENTS files shipped by several golang.org/x/* modules. The dependency set is entirely permissive: MIT, MIT-0, BSD-2-Clause, BSD-3-Clause, ISC-style, Apache-2.0, and the dual MIT and Apache-2.0 licensing of gopkg.in/yaml.v3. No copyleft dependency is present.

The generated inventory

The output is one deterministic Markdown file, THIRD_PARTY_NOTICES.md, in this order:

  1. An introduction.
  2. ## Summary, a table mapping each detected license to the number of modules that carry it.
  3. A section for the Go standard library and runtime, labelled with the Go version.
  4. One section per module in path order, listing that module's detected licenses and reproducing every collected file verbatim in fenced code blocks.

The generator runs go list -deps for each platform in the release build matrix with CGO_ENABLED=0, unions the modules the five builds actually link, and excludes the main module github.com/luispabon/steiner.

License and notice files are matched by name (license, licence, copying, notice, notices, copyright, unlicense, patents) at each module root and in every compiled package directory up to that module root. Test and testdata paths are skipped. Nested files therefore appear: in github.com/luispabon/ctok-go the root LICENSE, NOTICE and UNICODE-LICENSE are collected alongside internal/norm/LICENSE and internal/norm/PATENTS. The Go installation's own LICENSE and PATENTS are added for the standard library and runtime.

Generation fails when a compiled module ships no license file. A new dependency without licensing fails the run instead of silently dropping out of the inventory.

License names are matched heuristically against the file text, yielding MIT, MIT-0, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, MPL-2.0, Unlicense, or Other for anything unmatched. Those names are a summary only; the reproduced text is authoritative. A module can match more than one: gopkg.in/yaml.v3 detects as both MIT and Apache-2.0.

Keeping it current

  • After changing dependencies, run go mod tidy, then make notices, then review the THIRD_PARTY_NOTICES.md diff and commit it with the dependency change.
  • make notices-check reruns the generator with -check and exits non-zero when the committed file is stale. It runs as part of make check.
  • The lint job in .github/workflows/checks.yml runs make notices-check, so a stale inventory fails CI.
  • .gitattributes pins THIRD_PARTY_NOTICES.md to LF checkouts, so the byte comparison in -check holds on Windows.
  • When generation fails on a module with no license file, the inventory cannot include that module. Resolve it as a dependency change; the generated file is not edited by hand.
  • When a module is labelled Other, the heuristic did not match a known template. The reproduced text still ships; check that the section carries the module's complete license and notice text rather than adjusting the label by hand.

Release publication

.github/workflows/release.yml copies the repository file into the release assets as steiner-<version>-THIRD_PARTY_NOTICES.md, with the leading v stripped from the tag. The sha256 manifest steiner_<version>_checksums.txt is generated from steiner-* in the release directory, so the notices asset is listed there. The published copy is byte-identical to the committed file; nothing transforms it during release.

Known gaps

The notices ship as a release asset, not inside the binary. internal/update downloads only the platform binary named by assetName() and verifies it against steiner_<version>_checksums.txt, so a self-updated installation has no local copy of the notices unless the user fetches the asset. Embedding the notices in the binary, or surfacing them from the CLI, is not implemented.

Clone this wiki locally