Repository navigation
fix(ci): harden GitHub Actions workflows (#14789) - #14954
Closed
hf-security-analysis[bot] wants to merge 0 commit into
Closed
hf-security-analysis[bot] wants to merge 0 commit into
hf-security-analysis[bot] wants to merge 0 commit into
Conversation
dependabot
Bot
force-pushed
the
dependabot/github_actions/actions-ca6b5df6ad
branch
from
October 9, 2026 05:25
91e74c1 to
34b0044
Compare
hf-security-analysis
Bot
force-pushed
the
security/workflow-hardening/pr-14789
branch
from
October 9, 2026 05:27
fc9aed4 to
34b0044
Compare
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 #14789.
Targets
dependabot/github_actions/actions-ca6b5df6ad. Files changed, and what changed them:.github/workflows/claude_review.yml— action pins.github/workflows/pypi_publish.yaml— action pins.github/workflows/trufflehog.yml— action pinsFixed by this PR:
unpinned-action(pinact) — .github/workflows/claude_review.yml:39unpinned-action(pinact) — .github/workflows/pypi_publish.yaml:77unpinned-action(pinact) — .github/workflows/trufflehog.yml:20This does not fix everything. 44 further finding(s) (40 high, 4 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/bot_pytest.ymlgatepull-requests: writegh apicalls use literal paths that add a reaction to the triggering comment (issues/comments/{id}/reactions) and post a comment on the PR (issues/{PR}/comments); on a pull request,pull-requests: writecovers both.gpucontents: readactions/checkoutof the PR head ref needscontents: read; the remaining steps install packages and run pytest, andupload-artifactstores to the same run, so none of them use the token.reportpull-requests: writegh api -X PATCHcall to the literal pathissues/comments/{CID}edits the bot's comment on the PR, which needspull-requests: write..github/workflows/codeql.yml.github/workflows/pr_link_issue_reminder.ymlremindcontents: read,issues: write,pull-requests: writeutils/remind_link_issue.pyis not visible here; going by the job's description, it comments on and closes PRs via PyGithub, which needs pull-requests: write, and issues: write because PR comments go through the issues API. actions/checkout needs contents: read. Verify the script does nothing beyond this, since this set matches the job's existing declaration..github/workflows/stale.ymlclose_stale_issuescontents: read,issues: write,pull-requests: writeAnything 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.