Skip to content

fix(ci): pin publish workflow actions in secret-bearing jobs#108

Merged
chaliy merged 2 commits into
mainfrom
2026-05-17-fix-publish-workflow-security-vulnerability
May 17, 2026
Merged

fix(ci): pin publish workflow actions in secret-bearing jobs#108
chaliy merged 2 commits into
mainfrom
2026-05-17-fix-publish-workflow-security-vulnerability

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented May 17, 2026

Motivation

  • Close a supply-chain vulnerability where mutable GitHub Action refs ran in publish jobs that later receive CARGO_REGISTRY_TOKEN, allowing a compromised action to tamper with the runner and exfiltrate the token.
  • Harden the publish workflow without changing the existing publish flow or behavior.

Description

  • Pinned actions/checkout to a full commit SHA in both publish-fetchkit and publish-fetchkit-cli jobs to remove mutable tag/branch risk.
  • Replaced dtolnay/rust-toolchain@stable with explicit rustup install and rustup default stable steps to avoid executing an unpinned third-party action before secrets are available.
  • Kept the existing cargo publish steps and job ordering intact so publish behavior is unchanged.

Testing

  • Verified the updated .github/workflows/publish.yml contents and line-by-line output with sed/nl to confirm the intended changes were applied.
  • Committed the change locally with git commit to ensure the repository accepts the modified workflow file.
  • Could not run CI or workspace Rust tests in this environment due to missing remote access, so recommend running cargo test --workspace and letting CI validate the workflow and secrets handling before merging.

Codex Task

The previous pin 692973e was actions/checkout v4.1.7, not v6 as the
workflow intended. Update to the actual v6 commit SHA and add the
version comment for human-readability.
Copy link
Copy Markdown
Contributor Author

chaliy commented May 17, 2026

Fix-up pushed. Codex's pin 692973e3d937129bcbf40652eb9f2f61becf3332 is actually actions/checkout v4.1.7 (June 2024 release) — the workflow used @v6 before, so this would have silently downgraded the action by two majors. Verified via the GitHub API.

Replaced both occurrences with the actual v6 SHA de0fac2e4500dabe0009e67214ff5f5447ce83dd and added a # v6 trailing comment per convention. Rest of the change (replacing dtolnay/rust-toolchain@stable with explicit rustup install on the pre-installed toolchain) is good.


Generated by Claude Code

@chaliy chaliy merged commit 48f947c into main May 17, 2026
11 checks passed
@chaliy chaliy deleted the 2026-05-17-fix-publish-workflow-security-vulnerability branch May 17, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant