Repository navigation
ci: Keep scheduled.yaml's top level read-only and record its writer jobs (#962) - #2662
Merged
Merged
Conversation
zackees
enabled auto-merge
October 27, 2026 16:26
Member
Author
|
Handed off to the coordinator. RED |
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 27, 2026
zackees
enabled auto-merge
October 27, 2026 16:34
zackees
force-pushed
the
infra/962-sec-002-scheduled-permissions
branch
from
October 27, 2026 16:35
dcaf401 to
2f226df
Compare
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 27, 2026
zackees
force-pushed
the
infra/962-sec-002-scheduled-permissions
branch
2 times, most recently
from
October 27, 2026 16:52
93678ad to
9d47e92
Compare
zackees
enabled auto-merge
October 27, 2026 16:52
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 27, 2026
…obs (#962) The top-level block was 'contents: write', above the read-only maximum a top-level block may hold. It becomes 'contents: read'; every job that writes already carries (or now carries) its scope on the job itself, and each job id is recorded in ci.toml's [allow].permissions: services-availability contents/checks/pull-requests: write (opens a PR) build-project contents: write (grants it on to the called workflow) report-nightly-failure issues: write analyze-project security-events: write codeql security-events: write, packages: read upload-language-files and steam-upload declare no write need and are upstream-only (gated on repository_owner == 'obsproject'), so they stay read-only. The file's SEC-002 [[exceptions]] block is deleted. GREEN: ci-lint precheck loses scheduled.yaml's nine SEC-002 findings with no new finding; ci.test_ci_toml is 29 tests OK. Fixes #962
zackees
force-pushed
the
infra/962-sec-002-scheduled-permissions
branch
from
October 27, 2026 17:07
9d47e92 to
cf547f1
Compare
zackees
enabled auto-merge
October 27, 2026 17:07
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.
Part of the #962 ci-lint burn-down (SEC-002).
What changes
scheduled.yaml's top-level block wascontents: write, above the read-onlymaximum a top-level block may hold. It becomes
contents: read; every job thatwrites already carries (or now carries) its scope on the job itself, and each
job id is recorded in ci.toml's
[allow].permissions:services-availabilitycontents: write,checks: write,pull-requests: writebuild-projectcontents: writereport-nightly-failureissues: writeanalyze-projectsecurity-events: writecodeqlsecurity-events: write,packages: readupload-language-filesandsteam-uploaddeclare no permissions block and nowrite need, so they stay read-only; both are upstream-only, gated on
repository_owner == 'obsproject', so the fork never runs them. The file'sSEC-002
[[exceptions]]block is deleted, andci/test_ci_toml.pypins thewhole thing offline (
ScheduledPermissionsTest).RED → GREEN
124e19db3(test only): on the pre-change tree,ci-lint precheckreports
scheduled.yamlwith 9 SEC-002 findings (top-levelcontents: writeabove the max grant, plus the 5 jobs' unrecorded grants), andScheduledPermissionsTestfails.dcaf401f6:ci-lint precheckshows 0 SEC-002 findings forscheduled.yaml, total violations unchanged at 11, and no new finding.
SEC-002 falls
25 → 14on this base. That is the 9 scheduled findings plus 2more because
[allow].permissionsis keyed by job id: addingbuild-projecttocontents: writealso clears that job's finding inci.ymlandpush.yaml(their SEC-002
[[exceptions]]blocks stay until their remaining findingsclear).
Checks
uv run --no-project python -m unittest ci.test_ci_toml— 31 tests OK.uvx [email protected] check ci/test_ci_toml.py— clean.origin/master(1e68fc2da, after ci: Give sign-windows.yaml a read-only top-level token default (#962) #2659 landed); the add/addconflict in
ci/test_ci_toml.pyresolved as "master'sSignWindowsPermissionsTestplus my
ScheduledPermissionsTest", theci.tomlconflict as "master's listminus the scheduled block" (
git diff origin/master -- ci.toml= only my blockgone).
Not stamped with the local gate: on this host the gate's rust lane fails
independently of the change (stale host
soldr), so PR CI is the gate.Fixes #962