fix(ci): harden GitHub Actions workflows (#208) - #209
Closed
hf-security-analysis[bot] wants to merge 1 commit into
Closed
hf-security-analysis[bot] wants to merge 1 commit into
hf-security-analysis[bot] wants to merge 1 commit into
Conversation
dependabot
Bot
force-pushed
the
dependabot/github_actions/actions-2634b28785
branch
from
September 23, 2026 12:49
29f11ee to
dd4bbef
Compare
hf-security-analysis
Bot
force-pushed
the
security/workflow-hardening/pr-208
branch
from
September 23, 2026 12:51
f176f9d to
dd4bbef
Compare
dependabot
Bot
deleted the branch
dependabot/github_actions/actions-2634b28785
September 23, 2026 13:44
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.
Automated hardening of the workflow files flagged on #208.
Targets
dependabot/github_actions/actions-2634b28785. Files changed, and what changed them:.github/workflows/claude-code-review.yml— action pins.github/workflows/claude.yml— action pins; auth gate, llm injection.github/workflows/deploy-to-hf.yml— action pins.github/workflows/validate-conferences.yml— action pinsFixed by this PR:
unpinned-action(pinact) — .github/workflows/claude-code-review.yml:36broken_auth_gate(claude) — .github/workflows/claude.ymlllm_prompt_injection(claude) — .github/workflows/claude.ymlunpinned-action(pinact) — .github/workflows/claude.yml:29unpinned-action(pinact) — .github/workflows/claude.yml:35unpinned-action(pinact) — .github/workflows/deploy-to-hf.yml:23unpinned-action(pinact) — .github/workflows/validate-conferences.yml:22unpinned-action(pinact) — .github/workflows/validate-conferences.yml:23This does not fix everything. 2 further finding(s) (2 medium) need a decision this bot should not make for you. They are in the security channel with their locations — deliberately not repeated here, since this repository may be public and they are not fixed yet.
Permissions
.github/workflows/claude-code-review.ymlclaude-reviewcontents: read,id-token: write,issues: read,pull-requests: writeactions/checkoutneedscontents: read, andanthropics/claude-code-actionrunning the/code-reviewplugin reads PR/issue context and posts its review back to the pull request, which requirespull-requests: write(the file itself only declarespull-requests: read, so verify whether this run is expected to comment) plusid-token: writewhich the action uses for its OIDC-based token exchange..github/workflows/claude.ymlclaudeactions: read,contents: read,id-token: write,issues: read,pull-requests: readactions/checkoutneedscontents: read, andanthropics/claude-code-actionreads issue/PR context (issues: read,pull-requests: read), reads CI results via its declaredadditional_permissions: actions: read, and uses OIDC (id-token: write) to exchange for its own app token for any comment writes — the action is the step to double-check, since if it falls back to GITHUB_TOKEN for posting comments it would needissues: write/pull-requests: write.Anything not listed above keeps the permissions it had. To measure a job this could not read, add
GitHubSecurityLab/actions-permissions/monitorto it and run the workflow — it reports the minimum the run actually used.Pinning changes come from
pinactand are mechanical. Any other change was generated by Claude — read it before merging.