ci: declare per-job permissions on tests-schedule workflow#9492
Open
arpitjain099 wants to merge 1 commit into
Open
ci: declare per-job permissions on tests-schedule workflow#9492arpitjain099 wants to merge 1 commit into
arpitjain099 wants to merge 1 commit into
Conversation
The download job runs pytest against the dataset-download tests and,
on schedule failure, uses JasonEtco/create-an-issue to open a tracking
issue. That action's only API call is POST /repos/{owner}/{repo}/issues,
which needs issues:write. contents:read covers actions/checkout.
This matches the per-job permissions blocks already declared by the
reusable-test callers in this repo (id-token:write + contents:read on
build-cmake.yml, build-conda*.yml, etc).
Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/9492
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
The
tests-scheduleworkflow runs nightly against the dataset-download tests and, on schedule failure, usesJasonEtco/create-an-issue@v2.4.0to open a tracking issue. Right now it doesn't declare apermissions:block.The actual scope needed is small:
contents: readforactions/checkoutissues: writeforJasonEtco/create-an-issue(POST/repos/{owner}/{repo}/issues)This patch pins both at the job level, matching the per-job permission blocks already used by the reusable-test callers in this repo (
build-cmake.yml,build-conda-linux.yml,build-conda-m1.yml, ...): typicallyid-token: write+contents: readfor the OIDC + checkout pair.With explicit scope:
Token-Permissionscheck passes for this fileJasonEtco/create-an-issue(cf. tj-actions/changed-files CVE-2025-30066) stays confined to "can open issues", not the broader default scopeupdate-viablestrict.ymlis the other workflow in this repo that doesn't declare permissions, but it's deliberately small (one composite-action invocation, ~28 lines) and usesUPDATEBOT_TOKENfor any write path, so I left it out of this PR to keep the change focused.No behavioural change.