ci: declare contents:read on test_old_cpu workflow#93
Conversation
The test_old_cpu matrix runs Intel SDE-emulated tests on Sandy Bridge and Haswell baselines. No GitHub API write. contents:read is the floor. Style matches the per-job permissions block in build_wheels.yml (id-token:write for trusted publishing) and the workflow-level shape used by big_endian.yml, build_docs.yml, typecheck.yml. Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
|
This workflow is just for testing, so we anyways don't use API tokens here. |
|
My understanding is that this makes sense, although we should maybe set the defaults to be more restrictive to avoid just this type of thing. |
So @seberg should we take this patch or broadly fix the default ones? |
|
OK, I changed it now, it might be that other workflows fail (but I suspect they are OK). I.e the default is now:
I suspect that means you can do either... Merging is OK as it's explicit and other jobs still have it, but I am not sure there would be any difference now. |
|
Thanks @seberg, tightening the org default to read-only is the more durable fix. With the default restricted this PR is mostly defense-in-depth: the file still declares intent in-tree, which keeps the SLSA / Scorecard Happy either way. Merge if you'd like the explicit declaration on this file, or close as covered-by-org-default. All checks are green on the branch. |
|
Thanks @seberg and @arpitjain099 |
The
Test on Older CPUs (x86_64-v2)workflow runs an Intel SDE-emulated test matrix against Sandy Bridge and Haswell baselines. It only checks out, downloads SDE, installs system deps, and runs the test suite under emulation. No GitHub API write, no comment-on-PR step.This patch pins it to
permissions: contents: readat workflow scope, matching the per-job block inbuild_wheels.yml(id-token: writefor trusted publishing) and the workflow-level shape used bybig_endian.yml,build_docs.yml, andtypecheck.yml.With explicit scope:
Token-Permissionscheck passes for this fileNo behavioural change.