Skip to content

protect main branch against force push and delete#6

Merged
dave2wave merged 1 commit intoapache:mainfrom
hboutemy:protect-main
Mar 22, 2026
Merged

protect main branch against force push and delete#6
dave2wave merged 1 commit intoapache:mainfrom
hboutemy:protect-main

Conversation

@hboutemy
Copy link
Copy Markdown
Member

protect GH main branch against forced push and delete
for 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

@dave2wave
Copy link
Copy Markdown
Member

Thank you for catching this.

@dave2wave dave2wave merged commit 9f69e61 into apache:main Mar 22, 2026
@hboutemy hboutemy deleted the protect-main branch March 22, 2026 17:15
@ppkarwasz
Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants