# Release-chain provenance

Use public PyPI data to verify the origin of an exact Swarrm distribution.
The steps below do not require repository access. See the
[review guide](README.md) for version and scope.

## Release provenance status

| Releases | Provenance status |
|---|---|
| `1.1.4` | **Recorded first attested release.** The historical example below identifies its files and publisher. Verify the exact file bytes and signed attestation before relying on it. |
| `1.1.3` and earlier (16 versions) | **Historically recorded as unattested.** No retroactive attestation is claimed. Current index responses must be observed rather than inferred from this historical record. |
| Later and future releases | **Per-file verification required.** The sanctioned workflow (`.github/workflows/publish-pypi.yml`) uploads publish attestations and then re-downloads and verifies the exact distributions. A failed post-upload verifier prevents accepted completion; it cannot undo files already published. An unpublished candidate has no publication proof. |

## Check it yourself (no repository access)

The first attested release is `1.1.4`, published by GitHub Actions run
**34088399692**. Its two files and their SHA-256 digests as served by PyPI:

    swarrm-1.1.4-py3-none-any.whl  4a4e5fa4c7093ef0f05a3c925389ab71c26985866693fecdc4f631aa9adbc627
    swarrm-1.1.4.tar.gz            1eaee145aaa25700b3f07c50abdff9715a5098e704ad141ae47dae2b4cd601f7

1. **Fetch the provenance object** (public, unauthenticated):

       curl https://pypi.org/integrity/swarrm/1.1.4/swarrm-1.1.4-py3-none-any.whl/provenance

   Expect HTTP 200 and one attestation bundle whose `publisher` is exactly
   `{"kind": "GitHub", "repository": "capxholding/swarrm-core", "workflow":
   "publish-pypi.yml", "environment": "pypi"}`, carrying one attestation with
   predicate type `https://docs.pypi.org/attestations/publish/v1`. The same
   request for `swarrm-1.1.4.tar.gz` returns its own bundle — one attestation
   per file, not one per release.

2. **Tie it to the exact run.** The attestation's signing certificate, issued
   through the public Sigstore chain, embeds the workflow identity
   `capxholding/swarrm-core/.github/workflows/publish-pypi.yml@refs/heads/main`,
   the source commit `3a893f376e8bfa923763eed4ed19509d8df76e1f`, and the run URI
   `https://github.com/capxholding/swarrm-core/actions/runs/34088399692/attempts/1`
   — decode the bundle's certificate to read them. The repository is private,
   so the certificate, not the run page, is the public evidence: it is what
   binds the published bytes to that repository, workflow, commit and run.

3. **Confirm the historical boundary:**

       curl -o /dev/null -w '%{http_code}\n' https://pypi.org/integrity/swarrm/1.1.3/swarrm-1.1.3-py3-none-any.whl/provenance

   Expect `404`. That is the honest record of the pre-attestation era, not a
   defect being disclosed reluctantly.

## What this does and does not prove

After cryptographic verification against the exact distribution bytes and the
expected identity, a [PyPI publish attestation](https://docs.pypi.org/attestations/publish/v1/)
binds that distribution to its Trusted Publisher. This predicate is not a build
provenance statement and does not prove which build inputs produced the file.
Inspect signed certificate claims and the repository's additional source/run
checks separately. A JSON response or publisher label alone is not signature
verification. The [index-hosted attestation specification](https://packaging.python.org/en/latest/specifications/index-hosted-attestations/)
also permits provenance objects to change over time; preserve the observed bytes
and verification result for the exact release. An attestation does not certify
the code's behavior or security; the
verification path that needs no cooperation from us is `docs/AUDITOR_PATH.md`,
and the questionnaire answers in this folder state the rest of the posture.
