fix(ci): enforce Fern token permission policies - #4856
Open
chet wants to merge 1 commit into
Open
Conversation
Register the existing contents: read contracts for Fern validation, preview builds, and publishing with the shared permission checker. This leaves GitHub's runtime permissions unchanged while making declaration drift require an explicit policy update and review. Primary callouts are: - Expected green-run effect: Effectively none. This adds three small shell policy checks to the existing `changes` job. - What it really buys us: The read-only Fern documentation workflow family cannot gain new token access without an explicit policy update and review.
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (4)
Summary by CodeRabbit
WalkthroughThe pull request adds three Bash wrappers for Fern documentation workflow permission checks. It runs the wrappers in the Core CI ChangesFern permission enforcement
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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 three read-only Fern documentation workflows already limit their GitHub tokens to
contents: read, and GitHub applies that restriction at runtime. However, our repository policy check does not yet watch those declarations for drift. This PR enrolls all three workflows in the shared checker so any future permission change requires an explicit policy update and review. Runtime permissions remain unchanged.The write-scoped preview-comment workflow needs its permissions narrowed to the exact job that writes comments before the shared checker can adopt it, so that authority change stays in a separate follow-up.
Primary callouts are:
changesjob.What changed
contents: readcontract for each workflow's single job.Testing
git diff --checkpassed.cargo make check-format-nightlypassed.cargo make clippypassed.cargo make carbide-lintspassed.core-ci-passsucceeded.Closes #4853
Part of #4572.