feat: scope CI workflow permissions to least privilege#50
Merged
Conversation
Move permissions to job level; review mode drops contents:write -> read (it never pushes the baseline back to the PR branch - that is sync mode only, see action.yml `mode` input). Keeps uses: ./ dogfooding and the CodeBoarding App-token identity intact. Rebuilt PR #50 onto current main to resolve the no-common-ancestor conflicts left by main's history rewrite. This feat: also carries the already-merged codeboarding 0.12.5 engine bump (#49) into the next release, which release-please missed because #49's squash title lacked a Conventional Commit prefix. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7c4ed39 to
2cdc03e
Compare
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.
What
Move workflow permissions to job level (least privilege) in both dogfood workflows:
codeboarding.yml(review): workflow-levelpermissions: {}; thereviewjob requestscontents: read+pull-requests: write+issues: write. Review mode reads the repo and committed baseline and posts a PR comment — it does not commit generated files back to the branch (that is sync mode only), socontentsdrops fromwrite→read.codeboarding-sync.yml(sync): workflow-levelpermissions: {}; thesyncjob keepscontents: write(it pushes the regenerated baseline).uses: ./dogfooding and the CodeBoarding App-token identity are kept intact — this repo must run the action code under review, not the published release.Why this was conflicting
This PR was auto-generated by the webview
setup-actiononboarding flow on a stale base. Meanwhilemain's history was rewritten (force-pushed), leaving the original branch with no common ancestor to currentmain— so every file conflicted. The branch has been rebuilt directly on top of currentmain, which resolves the conflicts.Release
This is intentionally a
feat:so release-please proposes a release. It also carries the already-merged codeboarding 0.12.5 engine bump (#49) into that release — release-please missed #49 because its squash-merge title lacked a Conventional Commit prefix.