Skip to content

Pin CI dependencies to exact versions and commit SHAs - #234

Open
Scott-Emberson wants to merge 1 commit into
blader:mainfrom
Scott-Emberson:fix/pin-ci-dependencies
Open

Pin CI dependencies to exact versions and commit SHAs#234
Scott-Emberson wants to merge 1 commit into
blader:mainfrom
Scott-Emberson:fix/pin-ci-dependencies

Conversation

@Scott-Emberson

Copy link
Copy Markdown

Two hardening gaps in .github/workflows/validate.yml, found in a full-repo review:

  1. Unpinned npm install. npm install --global @anthropic-ai/claude-code resolved to whatever latest pointed at on each run, so every pull request and push executed a freshly published package (plus its dependency tree's lifecycle scripts) on the runner, and the same commit could pass one day and fail the next when a new release changed validation rules. The adjacent step already pins skills@1.5.20. Now pinned to 2.1.237 (current latest at the time of this PR); bump it deliberately in a commit when you want new validation behavior.

  2. Mutable action tags. actions/checkout@v4, setup-node@v4, and setup-python@v5 are tag references, and tags can be retargeted. Now pinned to full commit SHAs per GitHub's hardening guidance, with the human-readable version in a trailing comment so Dependabot can still bump them. SHAs verified against each action repo (checkout v4.4.0, setup-node v4.4.0, setup-python v5.6.0); same major versions as before, so no behavior change.

The workflow's trigger and permission choices (pull_request, workflow-level contents: read) were already correct and are untouched. No version bump since this changes CI only, not the skill.

🤖 Generated with Claude Code

The marketplace step installed @anthropic-ai/claude-code at whatever
latest resolved to, so the same commit could pass one day and fail
the next, and each run executed unreviewed new code on the runner.
The skills step already pinned 1.5.20; this makes the policy uniform.
Actions move from mutable tags to full commit SHAs per GitHub's
hardening guidance, with versions in trailing comments for bumps.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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