Repository navigation
Description
What happened
Security and stability hardening audit finding H03 / P2 (2026-09-28). Priority is an audit recommendation, not a claim of a production incident.
The PyPI path is well gated since #117: the tag must be the event commit on protected main, builds are reproduced, and wheel/sdist are covered by SHA256SUMS, build provenance and PEP 740 attestations. The two standalone install paths bypass those gates:
session-peer update(standalone installs) takes the latest release tag and downloadsraw.githubusercontent.com/abruption/session-peer/{tag}/session_peer.py. It reads the response without a size limit and accepts it if it contains the bytes__version__. There is no digest, no check that the file's version equals the tag, and no compile or--versioncheck before replacing itself.install.shdownloads frommain, i.e. unreleased code, not the latest release.
Nothing on GitHub makes the tag or release immutable: gh api repos/abruption/session-peer/rulesets returns [], v1.0.0 to v1.0.2 report immutable: false, and releases carry no assets. "Never move an existing published tag" in RELEASING.md is policy only. A moved tag, or a release published outside the workflow, would be served to self-updating clients even though the PyPI publish would fail closed.
What you expected
- A tag ruleset blocking update and deletion of
v*tags, and GitHub Immutable Releases enabled. - The standalone
session_peer.pypublished as a release asset, included inSHA256SUMSand the provenance attestation. - Self-update downloads that asset, enforces a size cap, verifies the digest, the literal
__version__against the tag, and--versionof the staged file before replacement. install.shinstalls the latest release by default (explicitmainopt-in only) and applies the same verification.
Environment
- Baseline: published session-peer v1.0.2, commit
2046836822b88e53246de73851186598604cb5ec. - Reproduction: source review plus read-only GitHub API queries (rulesets, releases); nothing was published or modified.
- Audit environment: macOS arm64, Python 3.14.7.
- No live message tests or production mutation.
Source evidence
- session_peer_core/updates.py#L408-L428 — raw tag URL
- session_peer_core/updates.py#L558-L565 — unbounded read, substring check only
- .github/workflows/publish.yml#L75-L78 — attestation over
SHA256SUMS - .github/scripts/release_artifacts.py#L172 — manifest names only wheel and sdist
- install.sh#L19, install.sh#L140-L141, install.sh#L200 — downloads from
main - RELEASING.md#L68 — tag policy
Acceptance criteria
- Tag ruleset and Immutable Releases are enabled and recorded in RELEASING.md.
- The release workflow publishes the standalone asset with digest and attestation, and fails if it differs from the tagged source.
- Self-update rejects oversized, digest-mismatched, wrong-version and non-running files, leaving the current file untouched.
-
install.shdefaults to the verified latest release; tests cover mismatch and success.
Scope and limitations
Target: v1.0.3 hardening work. This issue does not authorize a release or operating-service changes; repository setting changes need owner approval.
Related, not duplicates: #117 (PyPI release gates), #204 (staged install.sh writes), #185 (Homebrew distribution).
Checked
- Searched existing issues for duplicates.
- Removed credentials, conversation contents, private paths and real device/session identifiers.
- Used isolated fixtures without weakening inbound permissions.
Activity
abruption commentedon Oct 5, 2026
v1.0.3 is now an immutable stable release with seven assets. Preparation/main/publication gates passed; all seven exact-source attestations verified locally. The actual public-release download/provenance/manifest verifier passed against v1.0.3 and commit 0d25255, including staged standalone version validation. Published PyPI wheel/sdist hashes match the locked candidates. This is live signed-asset acceptance evidence, not a fleet deployment or an update of existing installed runtimes. Release: https://github.com/abruption/session-peer/releases/tag/v1.0.3