amaru-source / docs /FORKING.md
betterwithage's picture
mirror github.com/szl-holdings/amaru@779a0d7e4e69
a8b4b87 verified

Forking Amaru into your own UDS catalog

This document is for organizations — Defense Unicorns being the obvious one — who want to fork Amaru into their own GitHub organization, re-sign it with their own cosign key, and republish it under their own UDS catalog.

We want this to happen. The repository is structured to make it easy.


Decision: re-sign vs. wrap

You have two options.

Option 1 — Wrap (no fork, no re-sign)

You consume the upstream uds-v0.1.x tarball as-is. Your uds-bundle.yaml references the upstream signed package. Your end users verify against the upstream amaru-uds-dev.pub (or, in v0.2.0, against Sigstore Fulcio).

Pros: zero maintenance burden, no signing infrastructure, you inherit upstream releases automatically. Cons: your end users see an upstream signing identity, not yours.

Option 2 — Fork + re-sign (recommended for catalog operators)

You fork the repo into your org, build the Zarf package from source, sign with your own cosign key, and publish to your own release tags. Your end users verify against your pubkey.

Pros: signing identity matches your org's chain-of-trust; you control the release cadence; air-gap operators verify against a key they already trust. Cons: you take on signing infrastructure and per-release operational work.

The rest of this document is Option 2.


Prerequisites

  • node >= 20, pnpm >= 9
  • zarf >= v0.49.0
  • cosign >= v2.2.0
  • A cosign key your org has already established trust for, or a Sigstore Fulcio identity
  • Write access to a GitHub org under which to publish releases

One-time setup

# 1. Fork on GitHub UI: https://github.com/szl-holdings/amaru → Fork → <your-org>/amaru
git clone https://github.com/<your-org>/amaru
cd amaru

# 2. Install
pnpm install

# 3. Verify your toolchain matches what we used
zarf version       # expect v0.49.0+
cosign version     # expect v2.2.0+
node --version     # expect v20+

Per-release flow

# 1. Sync from upstream (or cherry-pick the commits you want)
git remote add upstream https://github.com/szl-holdings/amaru
git fetch upstream
git merge upstream/main          # or rebase, or cherry-pick

# 2. Build the Zarf package signed with YOUR cosign key
export COSIGN_KEY=/path/to/your-org-cosign.key
export COSIGN_PASSWORD=<your-password-or-empty>
bash artifacts/amaru-uds/scripts/build.sh

# 3. Verify locally
sha256sum dist/amaru-uds/amaru-uds-*.tar.zst
cosign verify-blob \
  --key /path/to/your-org-cosign.pub \
  --signature dist/amaru-uds/amaru-uds-*.tar.zst.sig \
  dist/amaru-uds/amaru-uds-*.tar.zst

# 4. Stage the verifier assets next to the tarball
cp /path/to/your-org-cosign.pub dist/amaru-uds/your-org-amaru-uds.pub
cp artifacts/amaru-uds/docs/{ARCHITECTURE,SECURITY,UDS-BUNDLE}.md dist/amaru-uds/
cp artifacts/amaru-uds/uds-bundle.yaml dist/amaru-uds/

# 5. Run the public-URL smoke test (it works against any release URL)
PUBLIC_BASE=https://github.com/<your-org>/amaru/releases/download/uds-vX.Y.Z \
  bash scripts/smoke-from-public-url.sh

# 6. Publish — your org's release pipeline. The repo includes a reference
#    GitHub Actions workflow at .github/workflows/release.yml that you can adapt.

What you should change in your fork

File Change
README.md Add a "this is a re-signed fork of szl-holdings/amaru" header with link to upstream
.github/CODEOWNERS Replace SZL maintainers with your org's
artifacts/amaru-uds/zarf.yaml metadata.name should include your org prefix (e.g. org-amaru-uds-multi)
artifacts/amaru-uds/scripts/build.sh Update the cosign key path comment if you keep keys elsewhere
dist/amaru-uds/*.pub Replace with your pubkey
OPERATOR-QUICKSTART.md (regenerated by build) Update the BASE URL and pubkey filename references

What you should NOT change

  • The doctrine code under packages/amaru-core/ — these are the invariants we collectively rely on. If you find a doctrine bug, file it upstream as a doctrine question and we will respond on the science.
  • The KS-18 cover, POVM constructions, Fisher–Rao implementation, or Bohr floor — these are not optional knobs.
  • The reference citations and derivations in docs/. If you disagree with a citation, file an upstream issue.

If you want to add doctrine — new pillars, new invariants — that is great, but please coordinate upstream first so the contracts evolve together rather than diverging silently across forks.

Distribution and naming

  • Trademark. "Amaru" is a trademark of SZL Holdings, LLC. Your fork should use a distinct distribution name (e.g. unicorn-amaru, org-amaru) so end users can tell them apart.
  • License. The upstream LICENSE continues to apply to the code you redistribute. Your additions are yours under the terms you choose, compatible with the upstream license.
  • Attribution. Keep NOTICE and the SZL copyright headers intact.

Telling us you forked

You don't have to, but if you do we will:

  • Add a one-line link to your fork in README.md under "Downstream catalogs"
  • Cross-link your release notes from our CHANGELOG.md when material doctrine changes flow between forks
  • Coordinate doctrine-question responses so we don't give you and your end users contradictory answers

Email stephen@szlholdings.com with the fork URL and your release-cadence expectations.

Reference verification commands (for your downstream end users)

BASE=https://github.com/<your-org>/amaru/releases/download/uds-vX.Y.Z
curl -fsSLO $BASE/<your-org>-amaru-uds-X.Y.Z.tar.zst
curl -fsSLO $BASE/<your-org>-amaru-uds-X.Y.Z.tar.zst.sha256
curl -fsSLO $BASE/<your-org>-amaru-uds-X.Y.Z.tar.zst.sig
curl -fsSLO $BASE/<your-org>-amaru-uds.pub
sha256sum -c <your-org>-amaru-uds-X.Y.Z.tar.zst.sha256
cosign verify-blob \
  --key <your-org>-amaru-uds.pub \
  --signature <your-org>-amaru-uds-X.Y.Z.tar.zst.sig \
  <your-org>-amaru-uds-X.Y.Z.tar.zst
zarf package inspect definition <your-org>-amaru-uds-X.Y.Z.tar.zst

That's the entire chain. No registry, no callback, no implicit trust.