Add functionality for allow self-hosted runner to protect workflow file and allow only execution only for collaborators for PRS
See original GitHub issueDescription:
Hi all, first of all I really like the github action runner and self-hosted runner.
It has however an issue with working for pull-request
workflows.
I think the runner should have a way to be configurable to run only on Pull-requests from collaborator of X org or Repo. The problem to be solved is to protect the github-workflow file and don’t be changed by any arbitrary PR ( so there is no output redirection or other code executed) it is a recurring topic in some forums, but there is no solution or any issue about this afaik. let me know, and ping me for any info .
best
Issue Analytics
- State:
- Created 3 years ago
- Reactions:69
- Comments:69 (7 by maintainers)
Top Results From Across the Web
About self-hosted runners
A self-hosted runner is a system that you deploy and manage to execute jobs from GitHub Actions on GitHub.com. For more information about...
Read more >GitHub Actions Security Best Practices [cheat sheet included]
First, GitHub doesn't allow individual accounts to use self-hosted runners on public repositories, but they do allow organizations to do so. If ...
Read more >GitHub Actions: secure self-hosted runners by limiting them ...
We're excited to announce an enhancement to the self-hosted runners experience that improves the security of your CI/CD workflows.
Read more >Restrict self-hosted runner groups to specific workflows
You can now restrict self-hosted runner groups to only be accessible from certain workflows. In addition to restricting which repositories ...
Read more >octokit/rest.js
Add custom labels to a self-hosted runner configured in a repository. You must authenticate using an access token with the repo scope to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
How about this:
An example:
Let’s say .github/workflows/pull-request.yml exists, and the suggested checkbox above is checked, and user John / DEV team is configured.
Workflow “.github/workflows/pull-request.yml” will not be executed if:
This allows contributors to create pull requests, and have workflows provide them (and maintainers) with feedback on the changes introduced by the pull request, and, in the same time preventing untrusted parties from changing a workflow, thus preventing any security issues that might arise.
WDYT?
@MalloZup sounds like some policy feature we can add on the service side even before sending the job to the runner.
@chrispat for feedback.