Skip to content

feat: add setup-deterministic-zip with pinned, checksum-verified install#92

Merged
rbarker-dev merged 3 commits into
mainfrom
fix/pin-checksum-deterministic-zip
Jul 16, 2026
Merged

feat: add setup-deterministic-zip with pinned, checksum-verified install#92
rbarker-dev merged 3 commits into
mainfrom
fix/pin-checksum-deterministic-zip

Conversation

@nathanklick

Copy link
Copy Markdown
Collaborator

Summary

Adds an opt-in setup-deterministic-zip installer that fetches timo-reymann/deterministic-zip at a pinned version (1.2.0) and verifies the release asset against a hard-coded per-platform SHA-256 before installing it, failing closed on mismatch. It follows the same pattern as the existing pinned+checksummed setup-jq, setup-gomplate, and setup-semver steps.

Why

Consumers currently install deterministic-zip inline with an unpinned, unverified pattern:

sudo curl -L -o /usr/local/bin/deterministic-zip \
  https://github.com/timo-reymann/deterministic-zip/releases/download/1.2.0/deterministic-zip_linux-amd64
sudo chmod -v +x /usr/local/bin/deterministic-zip
deterministic-zip --version

A mutable release tag with no integrity check means an upstream asset swap silently executes attacker-controlled code in the release path. This mirrors the semver supply-chain issue fixed in #90 / v1.2.2; this change lets consumers drop the inline curl | sudo install and opt in with setup-deterministic-zip: 'true' instead.

Design note

The release ships its own <asset>.sha256 sidecars, but those are not trusted here — a release-asset swap would replace the sidecar alongside the binary. The expected digests are hard-coded (as semver does), so any tamper fails closed. Supports Linux/macOS on amd64/arm64; bump instructions are in the step's env comment.

Verification

Digests baked in were reproduced from the 1.2.0 release assets, e.g. deterministic-zip_linux-amd6456e9c2e28c9f535f100df1a94df122b62f4f2f66300abde2cf68d6a236ee5eaa. A one-byte tamper changes the digest and shasum -a 256 -c - exits non-zero, aborting the step before install.

README updated with the new input and a usage note.


Supersedes #91 (which was opened from a fork). Same commit, GPG-signed.

Add an opt-in setup-deterministic-zip installer that fetches
timo-reymann/deterministic-zip at a pinned version (1.2.0) and verifies
the release asset against a hard-coded per-platform SHA-256 before
installing it, failing closed on mismatch. The release's own .sha256
sidecars are intentionally not trusted, since an upstream asset swap
would replace them alongside the binary.

Mirrors the existing pinned+checksummed jq/gomplate/semver steps.
Consumers can drop inline, unverified 'curl | sudo install' patterns.

Signed-off-by: Nathan Klick <nathan@swirldslabs.com>
@nathanklick
nathanklick force-pushed the fix/pin-checksum-deterministic-zip branch from 0badaba to 110393d Compare July 16, 2026 01:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an opt-in, supply-chain-hardened installer for deterministic-zip to this composite action by pinning a specific upstream release version and verifying a platform-specific SHA-256 before installing to /usr/local/bin.

Changes:

  • Added a new setup-deterministic-zip input to enable deterministic-zip installation.
  • Implemented a pinned download + hard-coded per-platform SHA-256 verification step that fails closed on mismatch.
  • Updated README to document the new input and show it in an example configuration.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
README.md Documents the new setup-deterministic-zip input and adds it to a usage example.
action.yml Adds the new input and a checksum-verified deterministic-zip install step for Linux/macOS amd64/arm64.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread action.yml Outdated
Comment thread README.md Outdated
Use a full copy/pasteable release URL in the action.yml bump instructions
instead of an ellipsis placeholder, matching the other pinned installers.

Reflow the README note so the version reads inline and format the arch
names as code.

Signed-off-by: Nathan Klick <nathan@swirldslabs.com>
Add a dedicated test-setup-deterministic-zip job that runs the action
with setup-deterministic-zip and verifies the binary, and wire the input
plus a verify group into the aggregate test-all job, mirroring the
existing jq/gomplate/semver coverage.

Signed-off-by: Nathan Klick <nathan@swirldslabs.com>
@rbarker-dev
rbarker-dev merged commit c96d9ed into main Jul 16, 2026
21 checks passed
@rbarker-dev
rbarker-dev deleted the fix/pin-checksum-deterministic-zip branch July 16, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants