ci: grant write permissions for tag creation - #90
Conversation
The 'Create and Push Git Tag' step requires 'contents: write' permission to push tags to the repository. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🏗️ PR Added to Squad Triage QueueThis PR has been labeled with Next steps:
|
SummarySummary
CoverageAppHost - 0%
Domain - 87.2%
ServiceDefaults - 0%
Web - 68.7%
|
|
There was a problem hiding this comment.
Pull request overview
This PR updates the CI workflow permissions to allow the workflow’s “Create and Push Git Tag” step to push tags back to the repository, completing the automatic versioning/tagging flow on push to main.
Changes:
- Update GitHub Actions job permissions from
contents: readtocontents: writein CI.
|
|
||
| permissions: | ||
| contents: read | ||
| contents: write |
There was a problem hiding this comment.
Granting contents: write at the job level applies to both pull_request and push triggers. That means PR runs (including code from feature branches) receive a write-capable GITHUB_TOKEN, which increases the blast radius (e.g., a compromised PR could push refs/tags/commits). Consider keeping contents: read for the build/test job and moving tag creation into a separate job (or separate workflow) that runs only on push to main with permissions: contents: write and needs: build-and-test.
| contents: write | |
| contents: read |
Change 'contents: read' to 'contents: write' so the 'Create and Push Git Tag' step can push tags.
This completes the automatic versioning workflow.