fix(ci): harden GitHub Actions workflows (#2391) - #2406
Merged
SBrandeis merged 1 commit intoSep 15, 2026
Merged
Conversation
SBrandeis
approved these changes
Sep 15, 2026
SBrandeis
merged commit Sep 15, 2026
504cca8
into
feat/rework-python-bindings
40 of 44 checks passed
SBrandeis
added a commit
that referenced
this pull request
Sep 15, 2026
* wip: new python bindings * document copy on access * ai: return np.ndarray from encoding + mechanical improvements * partialeq + hash on padding arguments * improve * move python_v2 -> python * update Python CI * add free-threaded python back * multiprocess + ft tests * bump version + rm comments * lint * error out when the Padding Mutex is poisonned * fixes * skip pickle tests for now * Encoding: support both native python list and numpy array as output * wip: pickling * mutliprocess v2 * re-add stub-gen bin * Add from_pretrained * refactor tests * test padding left * materialize padding in the Rust side * lint * ignore ty * padding and options * lint * add a header in the generated python stubs * fix(ci): harden workflow files flagged on #2391 (#2406) Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.com> * rust only, no python source code * clippy go * lint --------- Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.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.
Automated hardening of the workflow files flagged on #2391.
Warning
This narrows what the workflow can reach. Job permissions were declared in
.github/workflows/python.yml. Each job now gets only the scopes its steps were read to need — if one of them does something this could not see, it will fail on the next run. The table below says which step drove each scope.Targets
feat/rework-python-bindings. Files changed:.github/workflows/python.ymlFixed by this PR:
excessive-permissions(zizmor) — .github/workflows/python.yml:1excessive-permissions(zizmor) — .github/workflows/python.yml:14excessive-permissions(zizmor) — .github/workflows/python.yml:36excessive-permissions(zizmor) — .github/workflows/python.yml:93excessive-permissions(zizmor) — .github/workflows/python.yml:140Reported on the pull request but not fixed here — each needs a decision this bot should not make for you:
impostor-commit(zizmor) — .github/workflows/python.yml:22impostor-commit(zizmor) — .github/workflows/python.yml:54impostor-commit(zizmor) — .github/workflows/python.yml:104impostor-commit(zizmor) — .github/workflows/python.yml:151unpinned-uses(zizmor) — .github/workflows/python.yml:70unpinned-uses(zizmor) — .github/workflows/python.yml:120Permissions
.github/workflows/python.ymlbuild_win_32contents: readactions/checkoutplus toolchain/Python setup and acargo build, so read access to the repository is all the token needs.build_and_testcontents: readmake testrun only read the checked-out code (the HF_TOKEN secret is unrelated to token scopes).qualitycontents: readmake check-styleandgit diff --exit-codeonly inspect the local working tree and never push or report back to GitHub.auditcontents: readcargo install cargo-auditandcargo audit, which write no results back to GitHub (no SARIF upload), so only repository read is required.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.