Repository navigation
Pin GitHub Actions to commit SHAs (supply-chain hardening) - #8
Closed
raj-dubey1 wants to merge 3 commits into
Closed
raj-dubey1 wants to merge 3 commits into
raj-dubey1 wants to merge 3 commits into
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0127KpBfkiKKcFaYsrXLfUd2
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0127KpBfkiKKcFaYsrXLfUd2
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0127KpBfkiKKcFaYsrXLfUd2
Collaborator
Author
|
Closing in favor of cometchat-team/docs-mcp#57, which makes the same SHA pins in the private source repo. Reason: |
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.
What
Pin every GitHub Actions
uses:reference in the workflows to a full 40-character commit SHA, with a trailing# vX.Y.Zcomment preserving the human-readable version. No behavior change — each SHA is the exact commit the floating major tag currently resolves to.18 references across 3 workflow files:
actions/checkout@v5@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0actions/setup-node@v5@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0actions/upload-artifact@v7@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2docker/setup-buildx-action@v4@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1actions/github-script@v9@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0.github/workflows/ci.yml— 14 refs.github/workflows/publish-mcp.yml— 1 ref.github/workflows/search-eval-drift.yml— 3 refsWhy
A floating tag like
@v5is mutable: whoever controls the action's repo can move it to point at different code, which then runs in our CI with ourGITHUB_TOKEN. Pinning to an immutable commit SHA removes that supply-chain risk — the workflow runs exactly the reviewed code until we deliberately bump the SHA. This is the GitHub-recommended hardening for third-party actions.It also clears the one finding class that is currently keeping this repo's centralized scan below the listing threshold on hashgraph-online/awesome-ai-plugins (the awesome-ai-plugins directory we're being listed in). That scan scored 79 (threshold 80);
GITHUB_ACTION_UNPINNEDwas the dominant finding, so pinning these should take it over the line.Note: false positives to disregard (no code change)
The same scan flags 2×
DANGEROUS_DYNAMIC_EXECUTION(high) insrc/lib/frontmatter.ts. These are false positives: that file is a hardening wrapper whose entire purpose is to prevent dynamic execution — it detects gray-matter's language tag and refuses anything that isn't YAML/JSON, and replaces gray-matter's executable engines (javascript/js/coffee/cson/toml, whose built-injavascriptengine is a literaleval()) with ones that throw. The scanner is tripping on the engine names and the wordevalin the explanatory comments, not on any actual dynamic execution. No change is warranted here; flagging for reviewer awareness. (The scan's remaining items are advisory low/info: a missing.github/dependabot.yml, a missing.codexignore, and optional.codex-plugin/plugin.jsonmetadata fields — intentionally left out of this PR to keep it to the supply-chain fix.)How the SHAs were resolved
Each floating major tag was dereferenced to the commit it currently points to via the GitHub API (
repos/<owner>/<repo>/commits/<tag>), and the# vX.Y.Zcomment is the exact semver tag at that commit. No SHAs were guessed.🤖 Generated with Claude Code
https://claude.ai/code/session_0127KpBfkiKKcFaYsrXLfUd2