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

Github actions don't run on PRs from forks #1308

Open
lognaturel opened this issue Nov 26, 2024 · 4 comments
Open

Github actions don't run on PRs from forks #1308

lognaturel opened this issue Nov 26, 2024 · 4 comments

Comments

@lognaturel
Copy link
Member

lognaturel commented Nov 26, 2024

A PR from @ktuite on this repo ran 7 checks including Github actions: 2e76ed0

A PR from @alxndrsn on his fork only ran the build step in CircleCI: 54f10ce

Ideally all checks would run for forks of members of the organization and would require authorization for folks coming from outside the organization. That's how our other repos are set up.

@alxndrsn
Copy link
Contributor

What's the concern here?

There are a few other things we should probably also be considering for actions security. The default permissions seem quite permissive:

Screenshot_2024-11-27_09-26-45

@alxndrsn
Copy link
Contributor

@alxndrsn
Copy link
Contributor

alxndrsn commented Nov 27, 2024

I think this PR to restrict access to GITHUB_TOKEN from jobs would be helpful:

https://github.com/getodk/central-backend/compare/master...alxndrsn:actions-minimal-permissions?expand=1

Edit to add: these permissions may only take effect once the PR is merged 😆 I suspect we will need contents: read.

@lognaturel
Copy link
Member Author

lognaturel commented Nov 27, 2024

Made this as as a placeholder and hadn't had a chance to come back! The goal is for all checks including github actions to run for PRs made on the forks of contributors to the organization (e.g. @alxndrsn). Running checks for PRs from forks of contributors outside the org should require maintainer approval (at least the first time for each individual) -- https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/approving-workflow-runs-from-public-forks

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

2 participants