Repository navigation
fix(ci): harden GitHub Actions workflows (#14789) - #14998
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 12, 2026 17:36
34b0044 to
fbce7d2
Compare
hf-security-analysis
Bot
force-pushed
the
security/workflow-hardening/pr-14789
branch
from
October 12, 2026 17:38
e7d71af to
fbce7d2
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 POST a reaction toissues/comments/{id}/reactionsand POST a new comment toissues/{PR}/comments; since the target is a PR,pull-requests: writecovers both (if the bot were ever triggered from a plain issue,issues: writewould be needed instead).gpucontents: readactions/checkoutof the PR head ref needscontents: read; pytest needs no token, andupload-artifactwithin the same run needs no permission.reportpull-requests: writegh api -X PATCH repos/.../issues/comments/{CID}call edits the bot's comment on the PR, which needspull-requests: write..github/workflows/codeql.yml.github/workflows/pr_link_issue_reminder.yml.github/workflows/stale.ymlclose_stale_issuescontents: read,issues: write,pull-requests: writepython utils/stale.pystep's script is not in this file, but its name, the PyGithub install and the job's existing grant show it closes and comments on stale issues and pull requests, needing issues: write and pull-requests: write; actions/checkout needs contents: read — the reviewer should confirm the script does nothing beyond that.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.