Repository navigation
bot: define the five jobs that take over Refresh Bot's work - #19
Merged
Merged
Conversation
Refresh Bot is being retired, and bot/policy.json named only the three jobs
that run from this repository, so there was nothing for the other 37 workflow
files in the estate to ask for. These five cover all of them:
release-pr release-please, sync-upstream, rebuild-bundle,
visual-baselines, tzdata-bump, refresh, refresh-pins
estate-read ichava's estate-check, laranail's
audit-private-default-branches
private-dep-read simtabi/sis-sdk for laranail/sis-wrapper,
simtabi/docsmith for docsmith-scaffolder
consumer-read react-icon-browser and react-landingpage checking their
consumers' VENDORED.json before a release
package-repo-push GoReleaser updating simtabi's Homebrew tap and Scoop
bucket from simtabi/osaat
The permissions are not copied from the ceiling. Refresh Bot holds three
permissions -- contents=write, pull_requests=write, metadata=read -- and
simtabi-bot holds seven, workflows=write among them. So swapping one app for
the other is a narrowing only if each replacement job asks for no more than
Refresh Bot ever had, and prose does not keep that true. The new test asserts
it per job, and was proven red by planting workflows=write on release-pr
before being reverted.
release-pr is the one to watch: it is owners "*", so it is reachable for every
managed org, and it must never carry workflows=write or a release job could
rewrite the CI that gates it.
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.
Summary
Refresh Bot is being retired.
bot/policy.jsonnamed only the three jobs that run from this repository, so the other 37 workflow files in the estate had no job to ask for. These five cover all of them:release-pr*estate-read*estate-check, laranailaudit-private-default-branchesprivate-dep-readsimtabisis-sdk+docsmithtests.yml; docsmith-scaffolderconsumer-readichavaicon-browser+ichava.comcheck:consumerspackage-repo-pushsimtabihomebrew-tap+scoop-bucketThe permissions are not copied from the ceiling, and that is the point
Measured today with
gh api apps/<slug> --jq .permissions:Refresh Bot is the narrower app. So replacing it with simtabi-bot is only a narrowing if each replacement job asks for no more than Refresh Bot ever had — and nothing but a test keeps that true once these jobs are reachable.
RefreshBotReplacementTestasserts it per job. The one that matters isrelease-pr: it isowners: "*", reachable for every managed org, and it must never carryworkflows: writeor a release job could rewrite the CI that gates it.Verification
python3 -m unittest discover -s bot/tests), up from 17.workflows: writeonrelease-prfails 2 tests; reverting goes green. That permission is inside simtabi-bot's ceiling, so the policy still loads — the assertion is the only thing standing between that and an org-reachable token that can rewrite workflows.bot/resolve.py; the three narrowed ones refuse an owner they do not name, with a positive control on the owner they do.Not in this change
No workflow is re-pointed yet. simtabi-bot's private key lives in one environment on this repository, so no other repository can mint its tokens — moving the 37 files needs that resolved first, and it is a decision rather than a patch. These definitions are correct either way.