security: SHA-pin GitHub Actions workflows#2
Merged
Conversation
Pins actions/checkout@v4 and actions/setup-python@v5 to immutable SHAs. Adds Dependabot config to keep pinned SHAs fresh on a weekly cadence. Closes tag-hijack exposure class for CI workflows. Source: supply-chain-audit/SYSTEMIC_HARDENING_PLAN.md (Phase 1) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Addresses adversarial-review feedback from phase-1 wave review: - Replaces major-only # vN annotations (# v4) with specific patch versions (# v4.3.1) for one-glance auditability. SHA values unchanged; comments only. - Adds open-pull-requests-limit: 5 to dependabot.yml to prevent first-scan PR flood when pinned SHAs diverge from upstream tag movement. Review: ~/sessions/systemic-pinning-phase-1/reviews/wave-1.json Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
W503 is a flake8 code (line break before binary operator) that ruff never implemented. Passing it to '--ignore' fails with 'invalid value' on recent ruff. Removing unblocks the lint job. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
'Run tests' step invokes pytest but requirements.txt doesn't declare it. Install pytest explicitly in the install-deps step. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
First test run after adding pytest surfaced: 'async def functions are not natively supported'. Suite uses async pytest fixtures; requires pytest-asyncio plugin. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
actions/checkout@v4→@34e114876b0b11c390a56381ad16ebd13914f8d5(immutable SHA)actions/setup-python@v5→@a26af69be951a213d495a4c3e4e4022e16d87065(immutable SHA).github/dependabot.ymlto keep pinned SHAs fresh weeklyWhy
Tagged action refs (
@vN) resolve at workflow run time. If an action's tag is force-pushed (incident class: tj-actions/changed-files Mar 2025, reviewdog/action-setup Mar 2025), our CI runs the malicious code with secrets. Pinning to SHA freezes the resolved code; Dependabot keeps it fresh.Source
Phase 1 of
~/herakles-linux-opus/supply-chain-audit/SYSTEMIC_HARDENING_PLAN.md. Mechanical change viamheap/pin-github-action.Test plan
🤖 Generated with Claude Code