Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use branch protections when Actions make commits #326

Open
benr opened this issue Jul 26, 2023 · 3 comments
Open

Can't use branch protections when Actions make commits #326

benr opened this issue Jul 26, 2023 · 3 comments
Assignees

Comments

@benr
Copy link
Member

benr commented Jul 26, 2023

Branch protections on main to enforce reviews, signing, etc, prevent Actions from making commits themselves. Example:
https://github.com/mondoohq/installer/actions/runs/5672631904/job/15372275772#step:3:72

@benr benr self-assigned this Jul 26, 2023
@benr
Copy link
Member Author

benr commented Jul 26, 2023

See some threads on the topic:

There are a couple of possible solutions.

@benr
Copy link
Member Author

benr commented Oct 23, 2023

These are the following cases in which Actions commit back to the repo:

  1. PowerShell Signing
  2. VERSION file update

For PowerShell, one option is to remove the signatures from the script and only add the signed scripts to a release. This would mean some pain for anyone with automation currently expecting them in main.

For VERSION, the only place it is actively used is in the Makefile. This should be changed to use the release version instead, ie: $(curl -s https://api.github.com/repos/mondoohq/installer/releases/latest | jq -r '.tag_name' | tr -d v)

@benr
Copy link
Member Author

benr commented Oct 23, 2023

https://github.blog/changelog/2022-08-18-bypass-branch-protections-with-a-new-permission/ requires Enterprise :(

Even making mondoo-tools an admin user didn't allow it to bypass protection rules. :(

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

No branches or pull requests

1 participant