Skip to content

ci: Give sign-windows.yaml a read-only top-level token default (#962) - #2659

Merged
zackees merged 2 commits into
masterfrom
infra/962-sec-002-sign-windows-permissions
Oct 27, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/962-sec-002-sign-windows-permissions

Conversation

@zackees

@zackees zackees commented Oct 27, 2026

Copy link
Copy Markdown
Member

What

.github/workflows/sign-windows.yaml carried no top-level permissions block, so GitHub applied the wider repository default to the reusable workflow ([SEC-002] no top-level 'permissions' block). This adds a read-only default and deletes the file's SEC-002 [[exceptions]] block.

concurrency:
  group: sign-windows-${{ github.event_name }}-${{ github.ref }}
  cancel-in-progress: true
permissions:      # new
  contents: read
jobs:

RED

595942412 — new SignWindowsPermissionsTest in ci/test_ci_toml.py fails on the base: sign-windows.yaml needs a top-level permissions block and the SEC-002 exception for sign-windows.yaml must be deleted.

GREEN

  • ci/test_ci_toml.py 26 tests OK; ci/test_uv_run.py 5 OK; ruff check clean.
  • ci-lint precheck (pin a1917ce) loses the line and the header falls 545 → 544 approved exceptions, with no new violation (11 before and after):
ci-lint precheck: 11 violation(s), 544 approved exception(s), 11 needs_review
  • git diff origin/master -- ci.toml shows only this file's six-line block gone.

Caveat for the reviewer

The local copy of this reusable workflow is not invoked by any workflow in this repo: push.yaml's sign-windows-build job calls the pinned upstream obsproject/obs-studio/.github/workflows/sign-windows.yaml@<sha> and is guarded by github.repository_owner == 'obsproject'. So the read-only default has no runtime effect here.

The create-windows-update job does request an OIDC token (the "Parse JWT" step + actions/attest), and today it relies on the caller's grants (contents: read, id-token: write, attestations: write in push.yaml). SEC-002 does not allow a job-level id-token: write on this job (it is only permitted on an OIDC publisher), so this PR takes the tool's prescribed top-level-only fix. If a caller in this repo is ever repointed at the local copy, the signing job's id-token/attestations grants must be expressed on the job — a follow-up decision that also affects push.yaml's sign-windows-build.

Refs #962

…962)

RED: SignWindowsPermissionsTest fails on master — sign-windows.yaml has
no top-level permissions block and its SEC-002 exception is still in
ci.toml.

Refs #962
GREEN: sign-windows.yaml gains 'permissions: { contents: read }' and its
SEC-002 [[exceptions]] block is deleted. ci-lint precheck drops the
'no top-level permissions block' line and the header falls 545 -> 544
approved exceptions, with no new violation.

Refs #962
@zackees
zackees enabled auto-merge October 27, 2026 16:16
@zackees
zackees added this pull request to the merge queue Oct 27, 2026
Merged via the queue into master with commit 1e68fc2 Oct 27, 2026
32 checks passed
@zackees
zackees deleted the infra/962-sec-002-sign-windows-permissions branch October 27, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant