# static-web-server source-graph notices

These are corrected, distributable **conservative source-graph notices**, not an
exact official-binary SBOM or a certificate of legal compliance. Ship this whole
directory: [Cargo HTML](cargo-notices.html), [Cargo text](cargo-notices.txt),
[native-source notices](native-notices.txt), [Rust library notices](COPYRIGHT-library.html),
[musl copyright](musl-1.2.5-COPYRIGHT), Rust LICENSE-MIT/LICENSE-APACHE/COPYRIGHT,
and the GCC runtime-exception references. [manifest.json](manifest.json) contains
SHA-256 hashes, upstream references and verification results; its
`input_provenance` maps every preserved notice input to its origin. Package-level
archive checksums, manifest hashes, original SPDX expressions, selected notices
and target membership are in [inputs/graph.json](inputs/graph.json).

## Packaged controlled build

The current runtime uses the binary described by [controlled-build.json](controlled-build.json),
not the historical upstream executable below. The record includes SHA-256,
source/lock/recipe hashes, immutable base and prepared-builder IDs, target,
feature selection and actual Cargo compiler-artifact units. Build defaults are
disabled; Brotli/gzip are enabled. The conservative notice graph is verified to
cover all compiled packages, including build-only units.

The verified upstream source is kept unchanged. The packaged build uses the
declared `build/server-feature-overrides.json` derivative to remove Hyper's
HTTP/2 feature and shadow-rs's unused Git bindings. Its checked-in derived lock
is a subset of the upstream lock with every remaining version and checksum
unchanged. Both manifests and lock hashes are retained in the controlled build
record. The actual compiled inventory contains no h2, git2 or libgit2-sys;
native runtime acceptance also refuses an HTTP/2 prior-knowledge connection.

[runtime-inputs.json](runtime-inputs.json) records the authentic Rust 1.97.1 musl
archive hash and all verified target-library bytes. The [compressed link map](server-link.map.gz)
identifies the final self-contained musl libc/CRT/unwind inputs. These establish
controlled build provenance, not legal certification or byte equality to the
unlocked upstream executable. Rebuild with `build/server-build.py`; instructions
and builder prerequisites are in the repository README. The raw map stays in
the private build directory; this gzip copy is lossless.

## Scope and evidence — conservative upstream recipe

- Source: static-web-server 2.44.0 commit
  `27aa3450b6bf70bd1fa553b2197b53032affcba1`.
  Archive: <https://codeload.github.com/static-web-server/static-web-server/tar.gz/27aa3450b6bf70bd1fa553b2197b53032affcba1>;
  SHA-256 `fa04fc2ed8d8ff6cce6e1001cb80746bc7f0b9dc635324fb5b72d87ed4b9603f`.
- The recipe uses default features plus `--features all`, **not `--all-features`**,
  and `--cfg tokio_unstable`. Preserve the source `.cargo/config.toml`.
- **264 distinct packages**, root included, union of five musl target graphs:
  x86_64 264, aarch64 264, i686 262, armv7 261, arm 261. Build dependencies are
  included, dev dependencies excluded. This is broader than linked runtime code.
- Official image index:
  `sha256:2c1a7c3e0feaea5859307403b74e1c575f3ec1499094fc077344173d11abaae2`.
  Inspected amd64 executable SHA-256:
  `50b52a433b864d52624cc7654bc30ad3a0997ee9d24772b743a14dc5251f9439`.
  No other architecture's executable was inspected.
- Upstream release compilation was **unlocked** and used moving stable Rust.
  The inspected amd64 executable embeds Rust **1.97.1**, source commit
  `8bab26f4f68e0e26f0bb7960be334d5b520ea452`. Source metadata was resolved with
  Cargo/Rust 1.98.0, without compilation. A matching source tag/recipe does not
  establish equality to the unlocked binary's dependency graph.
- Rust `COPYRIGHT-library.html` is byte-identical to the checksum-verified official
  Rust 1.97.1 distribution, not the much broader whole-compiler attributions.
  Its remote licence links are supplemented by the unchanged local licence files;
  its inline LLVM/unwind/builtins and other attributions remain intact. musl 1.2.5
  COPYRIGHT and the exact Rust musl recipe are retained. For the historical baseline, recipe patches and exact
  linked CRT/unwind/GCC objects were not reconstructed. GCC 9.4/13.3 runtime
  exception copies are reference evidence, **not proof those runtime versions are
  linked** and not a substitute for identifying the actual runtime object inputs.

## Corrections and licence selection

`build/server-about.toml` uses cargo-about **0.9.2** SHA-256-pinned local and
commit-pinned remote clarifications. MIT is preferred where valid. alloc-stdlib
and maud/maud_macros notices come from their publication commits; chrono's entire
concatenated notice is preserved. brotli-decompressor selects its real **BSD**
notice rather than synthesizing an MIT attribution. ryu uses its real Apache text.
**AND** grants remain conjunctive (including is_debug, shadow-rs, ring, brotli and
unicode-ident); they are not rewritten as choices.

http-serde 1.1.3 publishes `Apache-2.0 OR MIT` in its manifest but no licence file;
four pinned upstream notice paths returned 404 in the prior evidence gathering.
We select **Apache-2.0**, retain the checksum-pinned published manifest with its
author/grant as evidence, and append the unchanged upstream server Apache licence
body. The manifest is **not** represented as the Apache licence body. No MIT
copyright, date, or author permission statement has been invented. The raw
cargo-about JSON alone is insufficient: the renderer supplies these Apache terms.

Native files are copied byte-for-byte: zstd's BSD alternative, libgit2's GPLv2
**with its actual linking exception**, zlib, ring, and mimalloc, including a
conservative superset of optional/alternative/build-only files. The published
zstd tree has no separate NOTICE file; its exact BSD copyright is retained.
Alternative GPL/LGPL texts contain authentic how-to-apply examples; these are not
unresolved MIT/BSD copyright placeholders and must not be edited out.

## Reproduction (no build, installation, container, or global config)

Python 3.11+ alone deterministically re-renders all documents from portable,
checked-in notice inputs; no audit cache or absolute machine paths are required:

```sh
python3 build/server-notices.py
```

The script verifies all input SHA-256 hashes, all 264 package associations, target
counts, specified AND grants, absence of synthetic MIT/BSD copyright placeholders,
byte-for-byte native/runtime copies, and unchanged Cargo text inclusion. HTML
escaping is verified reversible. Standard Apache/GPL instructional example fields
are preserved as part of their authentic full terms, not filled with invented data.

For an independent fresh Cargo harvest, obtain the checksum-pinned source archive
above, extract without changing Cargo.lock, and use an existing cargo-about 0.9.2
and Cargo 1.98.0. Set `ROOT` to this repository and `SOURCE` to the extracted source,
`WORK` to an isolated work directory (within this repository when working here).
The source graph's crates can be fetched through Cargo; archive checksums are in
Cargo.lock/inputs/graph.json. This performs metadata/notice harvesting, not a build:

```sh
mkdir -p "$WORK/cargo-home" "$WORK/cache" "$WORK/tmp"
export CARGO_HOME="$WORK/cargo-home" CARGO_TARGET_DIR="$WORK/target"
export XDG_CACHE_HOME="$WORK/cache" TMPDIR="$WORK/tmp"
(cd "$SOURCE" && cargo-about generate --locked --fail --features all \
  --config "$ROOT/build/server-about.toml" --format json -o "$WORK/about.json")
python3 "$ROOT/build/server-notices.py" --verify-about-json "$WORK/about.json"
```

Ensure those tool versions are selected in the process PATH; do not install them
or change global defaults merely to run this audit. Remote clarification files
are retrieved by cargo-about at the commit and checksum in the config. The verifier
compares all package expressions, exact licence text hashes and associations
against the portable snapshot. The five target counts record the prior separate
per-target queries; the new corrected cargo-about run verifies their union.
Native files can be re-extracted from the matching registry archives. Rust/runtime
source URLs and exact file/distribution hashes are in manifest.json. The optional
`--import-audit` switch is evidence ingestion for the original cached audit layout,
not required for ordinary reproducible generation. No draft notice is copied into
the deliverable as if it were corrected output.

This notice audit did not rebuild the server. Its binary observations describe
only the audited **prebuilt baseline**, not a final packaging decision. A separate
controlled build may replace that baseline; its resulting binary, locked inputs,
features and verification must be recorded separately by packaging. This full-graph
notice superset remains conservative and does not itself prove such a build.
Resolving remaining exact-binary/runtime limits requires controlled input
reconstruction and linker evidence. The parent packaging workflow must still
include/link this directory and verify the final distributed archive/image.
