Repository navigation
[release/0.5] Restrict GITHUB_TOKEN permissions on linux_job.yml callers - #23194
Conversation
|
Hi @shahtirth07! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
|
Add to the build-llm-demo job in _android.yml and the linux job in _unittest.yml. These jobs call test-infra's linux_job.yml (v1), which uses no OIDC token, so contents: read is enough. Clears zizmor's excessive-permissions finding on both jobs. Refs pytorch#20588
53eea3b to
2d5ce3f
Compare
|
And could you rebase with latest main branch to resolve Ci failures? |
|
Thanks for taking a look! @nil-is-all This PR targets release/0.5 rather than main, so rebasing onto main would pull all of main's history into the release branch. The branch is already on the latest release/0.5 (1bc0699, no new commits since Feb 2025). I think the failures are pre-existing on release/0.5 rather than caused by this change. Most of the failing jobs (test-models-linux, test-llama-runner-linux, the docs build, unittest/macos) come from workflows this PR doesn't touch. They fail inside the test script, which looks like the old branch's CI dependencies no longer resolving. Would you like me to do anything else here, or is it OK to merge with the release-branch CI in this state? If the old release branches aren't worth updating, I'm also happy to close this. |
|
@claude review CI failures and the code changes to check any relevant failures apart from dependency failures |
|
Claude finished @nil-is-all's task in 1m 58s —— View job CI failure review + code review
Bottom line: None of the CI failures are caused by this PR. They come from four separate problems, and each one is a toolchain or dependency issue or a platform change: the new CMake 4.x, PyPI dependency drift, and GitHub's new CI failures, grouped by root cause
Evidence that the permission change is safe:
Not exercised by CI: Code review# .github/workflows/_android.yml:10-12 and .github/workflows/_unittest.yml:17-19
uses: pytorch/test-infra/.github/workflows/linux_job.yml@release/2.6
permissions:
contents: read
RecommendationThe change is correct, and the failures are problems that already exist on release/0.5. Rebasing onto |
|
CI is largely broken on older release branches, hence the failing checks. I merged this anyways, as it is still the correct fix. |
Summary
Backports the excessive-permissions fix from #20588 to release/0.5.
Adds
permissions: contents: readto:These jobs call test-infra's linux_job.yml (v1), which doesn't use OIDC, so I left out the id-token: write that main has. Happy to add it if you'd rather match main exactly.
I have the same change ready for release/0.4, 0.3 and 0.2 and will open those once this one looks good.
Part of #20588
Test plan
zizmor 1.30.1 (--offline) on both files, before and after:
actionlint on both files: no new errors. The two remaining ones (the custom runner label linux.24xl.spr-metal and actions/checkout@v3) are on lines this PR doesn't change.
cc @nil-is-all