feat: lock down actions settings in apply-preferred-settings - #72
Merged
Conversation
scode
force-pushed
the
feat/repo-actions-lockdown
branch
from
August 25, 2026 03:16
dc19bab to
60946f7
Compare
CI on these repos runs on paid, self-hosted-style runners. A public repo accepts pull requests from any fork, and by default a fork PR's workflow runs on the base repo's runners as soon as that account has one merged PR — so anyone patient enough can run arbitrary code on runners billed to me. Requiring approval for every external contributor closes that; a read-only default token limits what an approved run that turns out to be malicious can still do. Neither is a hard ceiling (pull_request_target is never gated, and a workflow can raise its own token permissions), which the docs now say plainly. GitHub keeps two separate switches for this depending on visibility: the approval policy exists only on public repos, and non-public repos have their own fork-workflow controls instead. Rather than treating the inapplicable one as drift, each repo gets whichever applies, and for non-public repos the strictest option is taken: fork PR workflows don't run at all. Writes are now planned per endpoint from what actually drifted, so a setting an organization has locked can't block the ones that matter. The `first_time_contributors` variants are not accepted as already-correct even though GitHub offers them — they are the very defaults that let a once-merged account run workflows unattended.
scode
force-pushed
the
feat/repo-actions-lockdown
branch
from
August 25, 2026 03:57
60946f7 to
b9af0da
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.
CI on these repos runs on paid, self-hosted-style runners. A public
repo accepts pull requests from any fork, and by default a fork PR's
workflow runs on the base repo's runners as soon as that account has
one merged PR — so anyone patient enough can run arbitrary code on
runners billed to me. Requiring approval for every external
contributor closes that; a read-only default token limits what an
approved run that turns out to be malicious can still do. Neither is
a hard ceiling (pull_request_target is never gated, and a workflow can
raise its own token permissions), which the docs now say plainly.
GitHub keeps two separate switches for this depending on visibility:
the approval policy exists only on public repos, and non-public repos
have their own fork-workflow controls instead. Rather than treating
the inapplicable one as drift, each repo gets whichever applies, and
for non-public repos the strictest option is taken: fork PR workflows
don't run at all.
Writes are now planned per endpoint from what actually drifted, so a
setting an organization has locked can't block the ones that matter.
The
first_time_contributorsvariants are not accepted asalready-correct even though GitHub offers them — they are the very
defaults that let a once-merged account run workflows unattended.