Skip to content

ci: pin tj-actions/changed-files to a commit SHA - #2307

Open
holistis wants to merge 1 commit into
griptape-ai:mainfrom
holistis:fix/pin-tj-actions-changed-files-sha
Open

holistis wants to merge 1 commit into
griptape-ai:mainfrom
holistis:fix/pin-tj-actions-changed-files-sha

Conversation

@holistis

@holistis holistis commented Sep 8, 2026

Copy link
Copy Markdown

Description

docs-integration-tests.yml references tj-actions/changed-files@v47 by its mutable major-version tag rather than an immutable commit SHA.

Floating tags on third-party actions are exactly the mechanism behind GHSA-mrrh-fwg8-r2c3 / CVE-2025-30066: in March 2025, tj-actions/changed-files itself was compromised and its version tags (going back to v1) were retargeted to a malicious commit that dumped CI runner memory, including secrets, into workflow logs — which are public for public repositories.

This specific workflow is a good example of why that matters here: the Get Changed Files step runs in the same job as several dozen third-party secrets (AWS_*, OPENAI_API_KEY, GH_RELEASE_PAT, etc.) and contents: write / pull-requests: write permissions, so a repeat of the same style of attack against this action would have real reach in this repo.

As a small, concrete illustration of tag mutability: right now v47 still resolves to the v47.0.0 commit even though v47.0.6 has since been tagged upstream — the major tag simply hasn't been moved forward, and nothing stops it (or v1..v46) from being moved backward to something malicious without any new version ever being published for Dependabot to flag.

Fix

Pin the action to the v47.0.6 commit SHA, with a trailing version comment for readability:

uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6

This is the pattern GitHub's own security hardening guide recommends for third-party actions. The repo's existing github-actions Dependabot ecosystem entry already understands SHA-pinned uses: references and will keep opening version-bump PRs the same way it does today.

Scope kept intentionally minimal to this one action, since it's the one with a documented supply-chain compromise history; happy to follow up on the repo's other third-party action refs (softprops/action-gh-release, peter-evans/create-pull-request, readthedocs/actions/preview, codecov/codecov-action) in a separate PR if that's wanted.

Checklist

  • I have read and agree to the contributing guidelines.
  • Verified the target SHA resolves to the v47.0.6 tag via the GitHub API (gh api repos/tj-actions/changed-files/tags).
  • No behavior change: same action, same inputs, only the ref is now immutable.

🤖 Generated with Claude Code

tj-actions/changed-files was previously referenced by the mutable
major-version tag `v47`. Mutable action tags are exactly what let
CVE-2025-30066 (GHSA-mrrh-fwg8-r2c3) happen: an attacker with write
access to tj-actions/changed-files retargeted its version tags (back
to v1) to a malicious commit that dumped CI runner memory, including
secrets, into public workflow logs.

`docs-integration-tests.yml` runs this action in the same job as
several dozen secrets (API keys, DB credentials, GH_RELEASE_PAT) with
contents:write / pull-requests:write permissions, so a repeat of that
attack against this specific action would be high impact here.

As of writing, the `v47` tag still points at the v47.0.0 commit even
though v47.0.6 has since been released, which is itself a small
illustration of how a floating tag can silently lag or be moved
without a corresponding version bump that Dependabot would flag.

Pin to the v47.0.6 commit SHA (with a version comment for
readability) so the action can only run the exact reviewed code,
regardless of what the tag is later repointed to. Dependabot's
github-actions ecosystem entry in .github/dependabot.yml already
tracks and bumps SHA-pinned actions, so future updates keep working
the same way.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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