Skip to content

fix: pin Claude PR review action to immutable SHA#90

Merged
brandwe merged 1 commit into
mainfrom
fix/pin-claude-pr-review-action
Jun 26, 2026
Merged

fix: pin Claude PR review action to immutable SHA#90
brandwe merged 1 commit into
mainfrom
fix/pin-claude-pr-review-action

Conversation

@brandwe

@brandwe brandwe commented Jun 25, 2026

Copy link
Copy Markdown
Member

Summary

  • Pin anthropics/claude-code-action from the floating @v1 tag to the immutable commit SHA 428971d2ecd6e3a7cb0ee0da2a3a8b33fdb3678d (the commit v1 currently resolves to)
  • Remove the unused id-token: write permission from the claude-pr-review.yml workflow
  • Add tests/test_workflows_security.py regression tests so the workflow cannot drift back to a floating tag or regain id-token: write

Why

A floating action tag (@v1) is mutable — the upstream maintainer (or anyone who compromises the tag) can repoint it at arbitrary code that then runs in this repo's CI with contents: write, pull-requests: write, and issues: write. Pinning to a full commit SHA makes the referenced code immutable (supply-chain hardening, per GitHub's hardening guidance). The id-token: write permission was unused by this job and is dropped to minimize the workflow's privilege.

Provenance

This ports a fix originally written on the retired pre-rename entraclaw repo that was never upstreamed. The pinned SHA was refreshed from the original (stale) pin to the commit v1 resolves to today.

Validation

  • uv run --python 3.12 --extra dev python -m pytest tests/test_workflows_security.py -v — 2 passed
  • uv run --python 3.12 --extra dev ruff check tests/test_workflows_security.py — clean
  • uv run --python 3.12 --extra dev ruff format --check tests/test_workflows_security.py — clean

Pin the third-party Claude action to the current v1 commit
(428971d, the commit v1 currently resolves to) instead of the
floating @v1 tag, and remove the unused id-token: write permission
from the workflow. Add regression tests so the workflow cannot drift
back to a floating action tag or id-token write access.

Ports a fix originally written on the pre-rename entraclaw fork
(never upstreamed) and refreshes the pinned SHA to current v1.
@brandwe brandwe merged commit 27e05d8 into main Jun 26, 2026
5 checks passed
@brandwe brandwe deleted the fix/pin-claude-pr-review-action branch June 26, 2026 04: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.

1 participant