Skip to content

Pin secret-bearing third-party actions and the kup flake input - #4944

Open
docxology wants to merge 1 commit into
runtimeverification:developfrom
docxology:fix/pin-secret-bearing-actions
Open

docxology wants to merge 1 commit into
runtimeverification:developfrom
docxology:fix/pin-secret-bearing-actions

Conversation

@docxology

Copy link
Copy Markdown

Pins the three third-party references that run in secret-bearing release steps to immutable commit SHAs, plus the kup flake input used by the installer.

Changes (.github/workflows/release.yml)

Reference Before After
workflow/nix-shell-action @v3.3.2 @10ebd4e80eae8a5bc5147c0a36ebb568d1b277bd # v3.3.2
workflow/nix-shell-action @v3 @608eb20401e12c82b204e8e2c6a8b0eebfb5407c # v3
pypa/gh-action-pypi-publish @release/v1 @7245906fb61fa33a13554f9d5fb856fe61758086 # release/v1
github:runtimeverification/kup moving ref github:runtimeverification/kup/063314a75a3af900dbab864f4d5845fba2206e64

Rationale

These steps handle CACHIX_PRIVATE_KFB_TOKEN, CACHIX_PUBLIC_TOKEN, and PYPI_TOKEN (or feed executables consumed by later steps). Referencing them through mutable tags or a moving flake ref means an upstream compromise or an accidental tag move silently changes what executes in a publishing job — the pattern behind CVE-2025-30066 in tj-actions/changed-files. Pinning to SHAs removes that path; the tag is kept in a trailing comment for dependabot-style readability.

Broader pinning of the remaining actions (checkout, setup-java, artifact actions, cachix actions, etc.) is left out of this change to keep it minimal, but is worth doing separately.

Validation

  • actionlint .github/workflows/release.yml reports no new findings on the changed lines (the only diagnostic is a pre-existing composite-action metadata warning on ./.github/actions/with-k-docker, unrelated to this change).
  • No behavior change: the SHAs are the commits currently pointed at by the respective tags.

These steps run with repository secrets (CACHIX_PRIVATE_KFB_TOKEN,
CACHIX_PUBLIC_TOKEN, PYPI_TOKEN) or fetch executables consumed by later
steps, but were referenced through mutable tags or an unpinned flake ref:

- `workflow/nix-shell-action@v3.3.2` -> pinned to 10ebd4e8 (`v3.3.2`)
- `workflow/nix-shell-action@v3` -> pinned to 608eb204 (current `v3` commit)
- `pypa/gh-action-pypi-publish@release/v1` -> pinned to 7245906f (`release/v1`)
- `github:runtimeverification/kup` -> pinned to rev 063314a7

Pinning to commit SHAs prevents a moved tag or a compromised upstream from
silently changing what runs in a release job with publish credentials.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@docxology
docxology requested a review from a team as a code owner November 1, 2026 21:29
@docxology

Copy link
Copy Markdown
Author

Tagging @tothtamas28 for review, per CONTRIBUTING.md. The four pinned SHAs were re-verified against the upstream refs (workflow/nix-shell-action@v3.3.2 → 10ebd4e8, @v3 → 608eb204, pypa/gh-action-pypi-publish@release/v1 → 7245906f, runtimeverification/kup → 063314a7), and actionlint reports no new findings on the changed lines. This is an external-fork PR, so CI will not run here.

This branch has not been deployed

No deployments
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.

1 participant