open-standards/wai/tools/requirements-sota-int.txt
Transaction Science 48eaa9a587 ci: every Python install pinned by SHA-256; verifiers run with -I
Six workflow steps installed whatever PyPI served that day: cryptography
(wai-conformance, wai-http twice, wai-web-wasm), the RDF tools' dependencies
(wai-conformance), PyYAML (standards-build, aac-rs), the ML stack of
wai-neural-e2e, and pip itself (wai-neural-e2e, wai-sota-vectors). A
compromised release would have run on the runners. Each now installs a
hashed requirements file with --require-hashes, the way wai-pack.yml
already does:

- cryptography: wai/pack-conformance/requirements-verify.txt (the same file);
- RDF tools: wai/vocab/requirements-shapes.txt, from requirements-shapes.in;
- PyYAML: aac/aac-rs/tools/pagesets/requirements-ci.txt, from requirements-ci.in;
- wai-neural-e2e: wai/tools/requirements-neural-e2e.txt, from
  requirements-neural-e2e.in;
- wai-sota-vectors: wai/tools/requirements-sota-int-hashes.txt, from
  requirements-sota-int.txt.

Each generated file's header holds the uv command that regenerates it. The
two ML locks take torch and torchvision from the CPU wheel index through
wai/tools/torch-cpu-overrides.txt (2.14.0+cpu on Linux, 2.14.0 on macOS),
with no CUDA packages. The new lock files are added to the path filters of
the workflows that install them.

pillow goes from 12.3.0 to 13.0.0 in requirements-sota-int.txt: 12.x has
heap overflows in the TIFF writer and the JPEG decoder and an argument
injection into Ghostscript (GHSA-332p-7hrc-92wf, GHSA-8g5g-8vmr-9782,
GHSA-w889-685w-c8fh); 13.0.0 is the first fixed release.

The 26 verifier and differential calls that ran without -I now run with it,
so neither the working directory nor PYTHON* variables can put a module in
front of the standard library: pin, int_payload, staged, http (4), measure,
sim, sim_diff, claim, differential, jwp, chain and chain-gap differentials,
signer (2), check_shapes, smart-byte verify_v1, pack_verify and the five pack
differentials (7). Each script already puts its own directory on sys.path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 13:56:02 -04:00

28 lines
1.6 KiB
Text

# Pinned Python stack for regenerating the int_hyper integer-codec vectors (the
# pretrained mbt2018_mean, exported to integers; tools/wai_sota_vectors.sh). The vectors are regenerated rather than committed,
# so the export must run against a fixed stack: an upgrade that changes the
# pretrained weights or the float analysis transform must arrive as a reviewed
# change here, not silently on the next CI run.
#
# These are the pins as wanted. Install the hashed closure generated from them, which
# also takes torch/torchvision from the CPU wheel index (on Linux the default index
# resolves the multi-GB GPU builds; `==2.14.0` matches `2.14.0+cpu`):
# python -m pip install --require-hashes -r tools/requirements-sota-int-hashes.txt
# After changing a pin here, regenerate it with the command in its header.
torch==2.14.0
torchvision==0.29.0
# BSD-3-Clause-Clear. Supplies the mbt2018_mean architecture and the URL of its
# published checkpoint, mbt2018-mean-6-a19628ab.pth.tar. The checkpoint is NOT
# verified by compressai or torch.hub (the zoo calls torch.hub without
# check_hash), so wai_sota_int_synth_export.py pins its full SHA-256 and refuses
# to load any other bytes.
compressai==1.2.8
# compressai 1.2.8 requires numpy<2.
numpy==1.26.4
# 13.0.0 fixes the 12.x heap overflows and the Ghostscript argument injection
# (GHSA-332p-7hrc-92wf, GHSA-8g5g-8vmr-9782, GHSA-w889-685w-c8fh). Needs Python 3.11+.
pillow==13.0.0
# Source image only: `skimage.data.astronaut()` ships inside the wheel and is a
# NASA photograph documented there as "No known copyright restrictions, released
# into the public domain" (the function's docstring).
scikit-image==0.26.0