Repository navigation
CI: Limit workflow token permissions and checkout credentials - #2057
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Dmitriy Vasyura (dmitrivMS)
marked this pull request as ready for review
November 28, 2026 06:03
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
November 28, 2026 06:04
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the CI permission and checkout-credential hardening changes.
No open issues 🎉
What changed in this PR
Hardens the extension’s CI workflows by limiting token permissions and preventing later build and test steps from inheriting checkout credentials.
Changes:
- Sets pull request, push, and code-health workflows to
contents: read. - Disables checkout credential persistence, while preserving the Python version checker’s directly supplied issue-writing token.
- Reduces the label checker to
pull-requests: read; release, publishing, and localization permissions remain unchanged.
| File | Description |
|---|---|
.github/workflows/push-check.yml |
Limits token permissions and disables credentials for source and tools checkouts. |
.github/workflows/pr-labels.yml |
Replaces issue and pull request write access with pull request read access. |
.github/workflows/pr-check.yml |
Establishes workflow-wide read access and disables checkout credential persistence. |
.github/workflows/code-analysis.yml |
Restricts token permissions and disables credentials while retaining full history. |
.github/workflows/check-python-versions.yml |
Disables checkout credential persistence without changing the reporting token. |
Review effort: Max
Alexandru Dima (alexdima)
approved these changes
Nov 28, 2026
Dmitriy Vasyura (dmitrivMS)
deleted the
ci/limit-workflow-credentials
branch
November 28, 2026 07:58
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 pull request, push, and code-health jobs read source and produce artifacts; they do not push commits. Give these workflows
contents: readand disable checkout credential persistence so later builds, tests, and tools do not inherit Git authentication. The Python version check still receives its issue-writing token directly when it needs to report a problem.The PR label checker lists labels without posting comments. Give it
pull-requests: readinstead of write access to issues and pull requests. Release, publishing, and localization retain their existing permissions.