fix(ci): SHA-pin actions to satisfy org policy (clears startup_failure) + pin guard#5
Open
rayketcham wants to merge 2 commits into
Open
fix(ci): SHA-pin actions to satisfy org policy (clears startup_failure) + pin guard#5rayketcham wants to merge 2 commits into
rayketcham wants to merge 2 commits into
Conversation
…e) + pin guard CI startup_failed because actions were tag-pinned (@v4/@v5) while the org enforces sha_pinning_required - GitHub rejects tag pins before any job starts. Pinned actions/checkout (v4.2.2) and actions/setup-python (v5.3.0) to commit SHAs, and added a workflow-lint job that fails if any uses: is not SHA-pinned. Co-Authored-By: Claude <noreply@anthropic.com>
The workflow-lint guard greps for uses:...@ across .github/workflows and matched the literal regex text inside its own grep command. Anchored the pattern to real YAML uses: keys (optionally after a dash) so it only inspects actual action references. Co-Authored-By: Claude <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.
Root cause: the org enforces sha_pinning_required=true, but ci.yml pinned actions by tag (actions/checkout@v4, actions/setup-python@v5). GitHub rejects tag-pinned actions before any job starts, so every run was a startup_failure (main too - the old green predates the 2026-04-16 org hardening).
Fix: pin actions/checkout to 11bd719 (v4.2.2) and actions/setup-python to 0b93645 (v5.3.0), all 5 occurrences.
Reciprocal guard: new workflow-lint job fails the build if any uses: in .github/workflows is not pinned to a 40-char commit SHA.
Deferred (intentionally NOT here): the lint (ruff) job keeps continue-on-error and the security job is warn-only - both fake-green. Enforcing them needs care: the secret / dangerous-function greps currently match benign honeypot code (LDAP password= capture, a _handle_exec Docker emulation, os.urandom secret, SQL token= clause), so flipping to exit 1 as-is would red CI on false positives. That hardening is a separate focused change; this PR avoids a 40-file ruff reformat to keep the startup_failure fix reviewable.
Generated with Claude Code