protect main branch against force push and delete#6
Merged
dave2wave merged 1 commit intoapache:mainfrom Mar 22, 2026
Merged
Conversation
Member
|
Thank you for catching this. |
|
Hi @hboutemy, Yes, the minimum protection to reach a SLSA Source Level 2 requirement is disabling deletion and force-push on protected branches and tags. However, non-admin users and third parties will not be able to verify that until apache/infrastructure-asfyaml#89 is merged and we switch to GitHub Rulesets. Also, currently tags are not protected. |
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.
protect GH
mainbranch against forced push and deletefor GHA, every commit is de-facto a distribution, then this type of protection is even more useful than on any other Git repo
@ppkarwasz I suppose that such a Git repo for GH Actions would deserve SLSA Source controls: I did not really study https://slsa.dev/spec/v1.2/source-requirements but the basic protection I'm configuring in this PR is really the most basic first step
to me, with proper Git tag protection (I don't know how to implement, just talking from a pure logic perspective), such GHA could promote using Git tags again, which would be a great benefit for users to navigate from release to release, instead of using just Git commits chosen arbitrarily
just proposing a first step