Skip to content

ci: restrict token permissions and pin actions - #131

Merged
stevenh merged 1 commit into
mainfrom
ci/workflow-permissions
Nov 20, 2026
Merged

stevenh merged 1 commit into
mainfrom
ci/workflow-permissions

Conversation

@stevenh

@stevenh stevenh commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

The workflows ran with the default GITHUB_TOKEN permissions, granting every job more access than it needs. They now default to read-only contents, with write access only on the job that publishes releases.

Third-party actions are pinned to commit hashes, so a moved tag can't change what runs with the repository's token. This resolves the code scanning alerts for missing workflow permissions and the unpinned msvc-dev-cmd action.

The workflows ran with the default GITHUB_TOKEN permissions, granting
every job more access than it needs. They now default to read-only
contents, with write access only on the job that publishes releases.

Third-party actions are pinned to commit hashes, so a moved tag can't
change what runs with the repository's token.
@stevenh
stevenh merged commit 84a2cac into main Nov 20, 2026
6 checks passed
@stevenh
stevenh deleted the ci/workflow-permissions branch November 20, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants