Skip to content

Security: ScriptKittyOS/Requisition-Offline-Verifier

SECURITY.md

Security

Verify this release

Every release of Requisition-Offline-Verifier is built by the workflow .github/workflows/release.yml from a signed tag. The release files listed in RELEASE-SHA256SUMS (the Hex package and the program archive) are published only when each one is byte for byte the file that was reviewed before the tag. The kit archive, the bills of materials and the attestation bundle are written by the workflow when it releases, so they have no reviewed digest: the attestation (step 4) covers the release files, the kit archive and the bills of materials, and the kit archive's contents are checked against SHA256SUMS (step 7). These steps check that, from the outside. Each step names the files it needs; all of them are attached to the GitHub release (https://github.com/ScriptKittyOS/Requisition-Offline-Verifier/releases/tag/v0.3.0). The examples are for 0.3.0.

What the release holds:

File What it is
requisition_receipt_verifier-0.3.0.tar, verify_receipt-0.3.0.tar.gz the release files
RELEASE-SHA256SUMS the SHA-256 of each release file, as reviewed (also in the repository at the tag)
RELEASE-SHA256SUMS.mldsa87.json the ML-DSA-87 signature of RELEASE-SHA256SUMS by the release key
RELEASE-KEYS.json the release's ML-DSA-87 public key
verify_receipt-0.3.0.tar.gz the command-line program (an escript; it needs an Erlang/OTP 28 runtime) with its licence files: it embeds the Elixir 1.19.2 standard library (LICENSE.elixir, LICENSE.unicode)
verify_receipt-0.3.0.cdx.json the program archive's bill of materials
Requisition-Offline-Verifier-0.3.0.tar.gz this repository at the tag (step 7)
Requisition-Offline-Verifier-0.3.0.cdx.json the kit archive's bill of materials (the vendored ML-DSA verifier)
requisition_receipt_verifier-0.3.0.cdx.json the software bill of materials (CycloneDX 1.5)
v0.3.0.provenance.sigstore.json the build provenance attestation (SLSA v1, Sigstore bundle)
ALL-ASSETS.sha256 the SHA-256 of every file attached to the release

The release keys, with their fingerprints, are in RELEASE-SIGNERS (OpenPGP) and RELEASE-KEYS.json (ML-DSA-87) at the tag. A key read from the same place as the release proves only that the two agree, so the steps below take the fingerprints obtained another way: OPENPGP_FPRS (the OpenPGP fingerprints, 40 hexadecimal digits each) and KEY_SHA256 (the SHA-256 of the ML-DSA-87 key). Two other places publish them: the notes of the GitHub release (the workflow writes there the values its release environment holds, outside the repository) and the profile of the project's GitHub organisation (https://github.com/ScriptKittyOS). Compare the two, or use the values of an earlier release you already checked.

1. The tag (OpenPGP)

git clone https://github.com/ScriptKittyOS/Requisition-Offline-Verifier && cd Requisition-Offline-Verifier && git checkout v0.3.0
gpg --import RELEASE-SIGNERS.asc
git verify-tag v0.3.0
.github/release/verify-tag.sh --release-signers "OPENPGP_FPRS" v0.3.0 0.3.0

The keys are imported from the tag's own RELEASE-SIGNERS.asc. git verify-tag must report a good signature. verify-tag.sh must print verify-tag: PASS: it makes the check the workflow's publish job makes, in a new, empty keyring: an annotated tag on the commit checked out, signed by one of the keys OPENPGP_FPRS names, and RELEASE-SIGNERS at the tag lists exactly those keys, each with the status release. Offline once cloned.

2. The digests

In the folder that holds the downloaded release files and RELEASE-SHA256SUMS:

sha256sum --strict -c RELEASE-SHA256SUMS

Every line must say OK. Offline.

3. The post-quantum signature on the digests (ML-DSA-87)

RELEASE-SHA256SUMS is signed with ML-DSA-87 (FIPS 204, the pure form, empty context) by the release key before the tag is made. In the folder of step 2 (which also holds RELEASE-SHA256SUMS.mldsa87.json and RELEASE-KEYS.json), check it with this kit's checker; <kit> is the clone of step 1, at the tag, and KEY_SHA256 is the release key's fingerprint (the SHA-256 of its raw public key) obtained another way:

python3 -I <kit>/verifier/verify_release_sums.py --mldsa <kit>/verifier/vendor/mldsa.py \
    --sums RELEASE-SHA256SUMS --signature RELEASE-SHA256SUMS.mldsa87.json --keys RELEASE-KEYS.json \
    --expect-key KEY_SHA256

It must print PASS: .... Offline (standard library Python and the vendored pure-Python ML-DSA verifier, which the script refuses unless its SHA-256 is the pinned one).

4. The build provenance (GitHub artifact attestation)

The publishing job attests every release file. With the GitHub CLI:

gh attestation verify requisition_receipt_verifier-0.3.0.tar --repo ScriptKittyOS/Requisition-Offline-Verifier \
    --signer-workflow ScriptKittyOS/Requisition-Offline-Verifier/.github/workflows/release.yml \
    --source-ref refs/tags/v0.3.0 --deny-self-hosted-runners

This asks GitHub for the attestation. To check it offline, fetch the trusted root once (gh attestation trusted-root > trusted_root.jsonl) and give the bundle attached to the release:

gh attestation verify requisition_receipt_verifier-0.3.0.tar --repo ScriptKittyOS/Requisition-Offline-Verifier --bundle v0.3.0.provenance.sigstore.json \
    --custom-trusted-root trusted_root.jsonl --signer-workflow ScriptKittyOS/Requisition-Offline-Verifier/.github/workflows/release.yml

The attestation states that the file was built by that workflow, from that tag, on a GitHub-hosted runner (SLSA v1.0 Build Level 2, as GitHub describes its artifact attestations).

5. Build it yourself

The build is reproducible: the same tag and the pinned tools give the same bytes.

git clone https://github.com/ScriptKittyOS/Requisition-Offline-Verifier && cd Requisition-Offline-Verifier && git checkout v0.3.0
# docker; the build runs in the image named in .github/release/elixir-image, pinned by digest, without network
.github/release/install-hex.sh ../mix-home          # Hex 2.5.3; Mix checks the archive's signature
.github/release/build.sh v0.3.0 ../rebuilt ../mix-home
.github/release/check-sums.sh RELEASE-SHA256SUMS ../rebuilt

check-sums.sh must print PASS: the folder holds exactly the two files RELEASE-SHA256SUMS lists, each with the reviewed SHA-256. install-hex.sh downloads Hex 2.5.3 (mix local.hex); the build itself runs without network.

6. The package on Hex

hex.pm serves the same package file. Its checksum must be the digest in RELEASE-SHA256SUMS:

mix hex.info requisition_receipt_verifier 0.3.0     # prints the release's checksum

In a project that depends on it, the last value of the package's entry in mix.lock is that checksum, and Mix refuses a later download that does not match it.

7. The kit archive

The kit archive, Requisition-Offline-Verifier-0.3.0.tar.gz, holds this repository at the tag. It is not listed in RELEASE-SHA256SUMS (it contains that file, so its digest cannot be written there). Check it by its contents:

tar -xzf Requisition-Offline-Verifier-0.3.0.tar.gz && cd Requisition-Offline-Verifier-0.3.0
sha256sum --strict --quiet -c SHA256SUMS        # every file of the kit, listed in the signed tag's tree

There aren't any published security advisories