Skip to content

ci: pin GitHub Actions to immutable commit SHAs - #699

Open
enyst wants to merge 1 commit into
mainfrom
ci/pin-workflow-actions
Open

enyst wants to merge 1 commit into
mainfrom
ci/pin-workflow-actions

Conversation

@enyst

@enyst enyst commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

HUMAN:
Follows OpenHands/OpenHands#19381. Same approach: pin any mutable action reference (@v4, @v7, @release/v1) to an immutable commit SHA with a version comment. The pypa/gh-action-pypi-publish@release/v1 mutable branch — a PyPI publish workflow — is the sharpest one here.

—engel


AGENT:

Pins:

  • docker/* (setup-buildx, login, metadata, build-push): v4/v6/v7 → SHA
  • astral-sh/setup-uv: v7 → SHA
  • pypa/gh-action-pypi-publish: release/v1 → SHA
  • MishaKav/pytest-coverage-comment: v1 → SHA
  • actions/* (checkout, setup-python, github-script) → SHA

This PR was created by an AI agent (OpenHands / SmolPaws) on behalf of Engel.

Jev-Fast-Audit

⚡ Jev fast audit · estimates · 0.42s · commit 22f053b
Strongest signal: No primary concern selected.
Evidence: No primary concern to locate.
Coverage: complete supplied coverage; 21/21 hunks, 9/9 files.

All estimates and evidence
Estimate Likelihood / value Direct evidence
SQL injection 2.0% No direct hunk selected
Command injection 9.0% No direct hunk selected
Weakened authentication 4.0% No direct hunk selected
Weakened authorization 4.0% No direct hunk selected
Contract regression 5.0% No direct hunk selected
Data loss 4.0% No direct hunk selected
Sensitive data disclosure 4.0% No direct hunk selected
Unexpected data transfer 4.0% No direct hunk selected
Credential misuse 8.0% No direct hunk selected
Untrusted instruction authority 3.0% No direct hunk selected
Package source redirection 4.0% No direct hunk selected
Unverified remote execution 12.0% No direct hunk selected
Privileged environment access 4.0% No direct hunk selected
Security assessment bypass 5.0% No direct hunk selected
Prohibited workload 2.0% No direct hunk selected
Primary concern None selected; confidence 96.0% No primary concern to locate

Pin all third-party and GitHub-maintained workflow actions to full SHA
references with readable version comments.

- docker/* (setup-buildx, login, metadata, build-push): v4/v6/v7 -> SHA
- astral-sh/setup-uv: v7 -> SHA
- pypa/gh-action-pypi-publish: release/v1 -> SHA
- MishaKav/pytest-coverage-comment: v1 -> SHA
- actions/* (checkout, setup-python, github-script): pinned to SHA

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Engel Nyst <engel@enyst.org>
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Coverage

Warning

Your comment is too long (maximum is 65536 characters), so the coverage report was not added. See the job log for how to reduce it.

@github-actions github-actions Bot added the type: ci CI configuration changes label Nov 5, 2026
@neubig
neubig self-requested a review November 9, 2026 18:16

@all-hands-bot all-hands-bot 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.

This review was posted by an AI agent (OpenHands).

Scope gate: CI supply-chain hardening of this repository's own .github/workflows/ — in scope here.

Verification of every pin against upstream (checked now): each pinned SHA resolves to exactly the ref the base branch used at pin time — actions/checkout@3d3c42e5… = v7 tag ("prep v7.0.1 release"), actions/setup-python@6d4fd22b… = v7 tag, astral-sh/setup-uv@94527f2e… = v7 tag object (annotated; dereferences to the tagged commit), docker/setup-buildx-action@f87e5991… = v4, docker/login-action@8aa5831f… = v4, docker/metadata-action@dc802804… = v6, docker/build-push-action@c3c9e263… = v7, actions/github-script@373c709c… = v9 tag object, and pypa/gh-action-pypi-publish@7245906f… = the current release/v1 head, which is also the latest release tag v1.14.3 — the sharpest pin in the PR (a publish workflow with id-token: write) is the newest released version.

No behavior change vs base beyond pinning: triggers, permissions, env, and step inputs are untouched; the trailing-newline additions match the repo's yamlfmt pre-commit hook (ran locally: passes, no mutations; all 13 workflows parse cleanly).

Checks: all required checks on head 22f053b9… are green (backend, unit-tests, both image builds, multi-arch manifest, pr-title, PR description, artifacts).

Non-blocking observations (no action requested for merge):

  • The # v1 comment on MishaKav/pytest-coverage-comment@9516bf7f… has drifted: that pin is the v1.13.0 release, while the v1 tag now points to v1.13.1 (three commits, latest a missing-coverage-files table fix). The step is continue-on-error and only posts a coverage comment, so this is documentation drift, not a defect.
  • Cross-repository reusable workflows (OpenHands/release-actions/.github/workflows/*.yml@main, OpenHands/OpenHands-Cloud/...bump-image-tag.yml@main) remain on @main. That is a deliberate cross-repo coordination decision outside this PR's stated scope, worth a follow-up only if the org wants org-owned workflow refs immutable too.

✅ APPROVED

@neubig neubig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we please make these be auto-updated? Otherwise these versions may get stale and not get security upgrades. Too-new versions are a supply chain risk, but so are too-old versions: https://github.com/OpenHands/software-agent-sdk/blob/main/.github/workflows/update-version-pins.yml

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

type: ci CI configuration changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants